We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

GanttGrid cell templates

How can I change the GanttGrid's cell templates? I have tried to set the StyleInfo.CellItemTemplate and StyleInfo.CellEditTemplate properties to my custom DataTemplate in the NodesPopulated event handler but nothing happens.

I am using the following lines of code:

((GanttGrid)sender).InternalGrid.Columns[i].StyleInfo.CellItemTemplate = oItemTemplate;
((GanttGrid)sender).InternalGrid.Columns[i].StyleInfo.CellEditTemplate = oEditTemplate;


2 Replies

OW Oscar Wahlen January 19, 2012 08:18 AM UTC

I have finally managed to set my custom DataTemplate. What I did was move the style setter code to the GanttGrid's Loaded event handler. In the event handler I manually create the column collection and set the GridStyleInfo.CellType property to DataBoundTemplate. This allowed me to set a custom DataTempate.



TH Thanigaivelan Syncfusion Team January 20, 2012 05:00 AM UTC

Hi Oscar,

Thanks for showing interest on Syncfusion products.

We have exposed the GanttGrid as public in our upcoming release Volume 1, 2012. You can customize the GanttGrid by handling the Gantt’s loaded event. The procedure which you have followed to customize the column is correct and you can do that in Gantt’s loaded event itself.

Please let us know if you need any further assistance, we are happy to help you.

Thanks,
Thanigaivelan.



Loader.
Live Chat Icon For mobile
Up arrow icon