Hi,
I want to do following with GanttControl:
|
private void GanttGrid_Loaded(object sender, RoutedEventArgs e)
{
foreach (var item in Gantt.GanttGrid.Columns)
{
if ((item as GridTreeColumn).HeaderText == "Progress (%)")
{
Gantt.GanttGrid.Columns.Remove(item);
return;
}
}
} |
|
private void Model_QueryCellInfo1(object sender, Syncfusion.Windows.Controls.Grid.GridQueryCellInfoEventArgs e)
{
// to hide the border of the header
if (e.Cell.RowIndex == 0 && e.Cell.ColumnIndex == 1)
{
var lightpen = new Pen(e.Style.Background, 2);
e.Style.Borders.Right = lightpen;
e.Style.Borders.Left = lightpen;
}
} |
|
<sync:GanttControl x:Name="Gantt" Grid.Row="1" Loaded="GanttGrid_Loaded" ScheduleType="WeekWithDays"
ItemsSource="{Binding TaskCollection}"
VisualStyle="Metro">
</sync:GanttControl> |
|
Query |
Solution | |
|
Customize the left most column, which right now only shows 0, to have a checkbox or if not
possible, remove/hide the column |
It is possible to hide this column by disabling the ShowRowHeader property as shown below.
Sample link :
https://www.syncfusion.com/downloads/support/directtrac/general/ze/GanttSample206752040532884130 | |
|
Define treeindex column As you can see in the screenshot above, the column where we see expander icon, by default + icon. It always takes first column (0 index) as expander column and in my case, first column is CheckBox column as shown in the screenshot below. |
It is not possible to add check box in the expander column of the grid and also the expander column will always be the first column in the grid. |