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

gridGroupingControl with Gantt Control - Forms/WPF

Hi.
how to connect data from gridGroupingControl 1
with Gantt Control

changes in the chart were written in the table


Regards,
Grzegorz


1 Reply

SA Santhiya Arulsamy Syncfusion Team March 29, 2016 12:47 PM UTC

Hi Grzegorz,
Thanks for contacting Syncfusion support.

We have analyzed your requirement. In the sample data set bound to the GridGroupingControl, it is not compatible with GanttControl, so that need to parse the data set and convert it into the generic collection by using following steps.

Step 1:

Need to create a template class with properties to hold the each column values of DataSet.

Public class Model
{
// First column value holder
Public DataType ColumnName1{ get; set; }
Public DataType ColumnName2{ get; set; }
.
.
.
Public DataType ColumnNameN{ get; set; }
}

Step 2:

Generate a record for each row in the Dataset and add it into the collection.

ObservableCollcetion<Model> collection = new ObservableCollcetion<Model>();

Collection.Add(new Model()
{
ColumnName1 = GridGroupingControl.DataSet.Column1.
ColumnName2 = GridGroupingControl.DataSet.Column2.
});

Step 3:

Bind the collection to the GanttControl ItemsSource property.

Refer to the following code sample for further reference.

http://help.syncfusion.com/wpf/gantt/data-binding

Thanks,
Santhiya A

Loader.
Up arrow icon