10767 : Columns for databind

Question

This may be a simple question but having some issues trying to figure it out. How do you connect a DataSource to the gantt chart at runtime and have the columns show up?

What I mean is that the only way I have been able to get something to show up on the control is if I go into the properties of the control at design time and manual add a column the to the collection and map it to the specific field from the datasource. Is there a way to set the data source at runtime and just have the data appear?

Maybe I’m just missing something simple.

Answer

Go like this Gantt.Grid.AutoCreateColumnsFromDataset=true, it should do it