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.

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; 
        } 
 
 
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 


Loader.
Up arrow icon