Priorities for leveling resources with GanttChartDataGrid for WPF

With the latest builds of Gantt Chart Light Library, the WPF based GanttChartDataGrid component may level resources for you by taking item priorities in considerations as well.

To set it up, simply update GanttChartItem.LevelingPriority int values from their zero default on yout leaf items according to your needs, and there you go – when you’ll call LevelResources() method of the component, the tasks would be rescheduled so that resources are not overallocated and also ensuring that for any resource the assigned item that have higher priority will be scheduled before any other items assigned to the same resource.

It’s also easy to setup a column allowing end user to set up leveling priorities, if you want. However, we recommend that you hide these values for summary items (as they are irrelevant in resource leveling algorithm’s context):

<DataGridTemplateColumn Header=”Priority”>
  <DataGridTemplateColumn.CellTemplate>
    <DataTemplate>
      <TextBlock Name=”TextBlock” Text=”{Binding LevelingPriority}”
        Padding=”4,2″/>
      <DataTemplate.Triggers>
        <DataTrigger Binding=”{Binding HasChildren}” Value=”True”>
          <Setter TargetName=”TextBlock” Property=”Visibility”
            Value=”Collapsed”/>
        </DataTrigger>
      </DataTemplate.Triggers>
    </DataTemplate>
  </DataGridTemplateColumn.CellTemplate>
  <DataGridTemplateColumn.CellEditingTemplate>
    <DataTemplate>
      <TextBox Name=”TextBox” Text=”{Binding LevelingPriority}”
        Padding=”1,1″/>
      <DataTemplate.Triggers>
        <DataTrigger Binding=”{Binding HasChildren}” Value=”True”>
          <Setter TargetName=”TextBox” Property=”Visibility”
            Value=”Collapsed”/>
        </DataTrigger>
      </DataTemplate.Triggers>
    </DataTemplate>
  </DataGridTemplateColumn.CellEditingTemplate>
</DataGridTemplateColumn>

Advertisement

About DlhSoft Team

DlhSoft is a software development company focused on building high quality and innovative solutions using state-of-the-art technologies for customers worldwide. Our activity includes designing and developing general purpose software applications, components and tools, and customized software solutions upon request. DlhSoft team is highly experienced and fully dedicated to software development. Additionally, one of the most important things we rely on is the continuous communication with the customer.
This entry was posted in Development Components and tagged , , , . Bookmark the permalink.

Add a reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s