GanttGrid style in GanttControl
Hi,
How can I change row height for GanttGrid in GanttControl ? There is Gantt.RowHeight property but it only changes the GanttSchedule row height.
And how can I hide gridlines in GanttGrid ? There is Gantt.GanttGrid.InternalGrid.ShowGridLines property but it doesn`t do anything.
SIGN IN To post a reply.
3 Replies
1 reply marked as answer
RS
Ramya Soundar Rajan
Syncfusion Team
September 2, 2020 10:58 AM UTC
Greetings from Syncfusion.
Query 1: How can I change row height for GanttGrid in GanttControl?
We would like to inform you that you can change the row height of the GanttGrid using the RowHeight property of GanttControl as per in below code snippet.
|
ganttControl = new GanttControl
{
ItemsSource = (this.DataContext as ViewModel).TaskDetails,
RowHeight=100
}; |
Query 2: how can I hide gridlines in GanttGrid?
You can achieve this requirement by setting the border color in the QueryCellInfo event argument as per in below code snipper.
|
private void GanttControl_Loaded(object sender, RoutedEventArgs e)
{
ganttControl.GanttGrid.Model.QueryCellInfo += this.Model_QueryCellInfo;
ganttControl.GanttGrid.InternalGrid.InvalidateCells();
}
private void Model_QueryCellInfo(object sender, GridQueryCellInfoEventArgs e)
{
var lightpen = new Pen(e.Style.Background, 0);
e.Style.Borders.Right = lightpen;
e.Style.Borders.Left = lightpen;
e.Style.Borders.Top = lightpen;
e.Style.Borders.Bottom = lightpen;
} |
Sample Link: https://www.syncfusion.com/downloads/support/forum/157484/ze/GanttControl_RowCustomizationSample403102253
Regards,
Ramya S
Marked as answer
DB
Dominik Bojdo
September 2, 2020 06:28 PM UTC
Thank you, it solves my problem.
RS
Ramya Soundar Rajan
Syncfusion Team
September 3, 2020 05:39 AM UTC
Hi Dominik Bojdo,
Thanks for your update.
We are glad to hear that given solution works. Please let us know if you would require any further assistance.
Regards,
Ramya S
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
- Marked answer
-
DB Dominik Bojdo
- Sep 1, 2020 07:49 PM UTC
- Sep 3, 2020 05:39 AM UTC