BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
Hi Adam,
Thank you for using Syncfusion products.
We have analyzed your query. We regret to inform you that we don’t have a support to add a different child types in GridTreeControl. Hence the exception was raised. Could you please share more details or a snap shot for your requirement? This would be more helpful for us to serve you in better.
Please let us know if you need further assistance.
Thank you,
Jai Ganesh S
"Could you please share more details or a snap shot for your requirement?"
I believe the subject line covers this adequately.
If you're still in need of some inspiration, check out the equivalent Infragistics & Dev Express "tree grid" controls - they both provide this functionality.
- Adam
Hi Adam,
Thank you for the update.
As we mentioned in the last update, we don’t have a support to add different children types in GridTreeControl by using the code snippet provided by you. However you can add different child types by adding a datas through work around. We have prepared the sample based on this and please find the sample under the following location,
Sample: http://www.syncfusion.com/downloads/support/directtrac/117823/GTC_HierarchicalData-605843145.zip
Please let us know if you need further assistance.
Thank you,
Jai Ganesh S
"However you can add different child types by adding a datas through work around. We have prepared the sample based on this..."
I've taken a look at the sample you provided. It still doesn't demonstrate how to add different child types - they are all of type "BusinessObject"?
- Adam
Hi Adam,
Sorry for the delayed response.
We have already mentioned in our previous updates that our GridTreeControl does not directly support to add different child types. But you can achieve this requirement by setting different type of properties as GridTreeUnBoundColumns and set the values for UnBoundColumns through QueryUnboundCellInfo event. We have prepared the sample based on this and please find the sample under the following location,
Sample: http://www.syncfusion.com/downloads/support/directtrac/general/GridTreeSample2059116872.zip
Note:
In the above sample we have created the EmployeeCity, EmployeeDesignation as GridTreeUnboundColumns and set the values for this columns through QueryUnboundCellInfo event.
Please let us know if you need further assistance.
Thank you,
Jai Ganesh S
Hi Adam,
We regret to inform you that we will not update the edited values of UnboundColumn. The UnboundColumns are not in business object and it is not belong to the data source. Please refer the following UG link to know more details about UnboundColumns,
UG Link:
http://help.syncfusion.com/ug/wpf/default.htm#!documents/unboundcolumns2.htm
Please let us know if you need further assistance.
Thank you,
Jai Ganesh S
Hi Adam,
Please ignore the previous update.
Currently our GridTreeControl not supported to update the edited values in UnboundColumn directly but we can achieve this by through work around. We have prepared the sample based on this and please find the sample under the following location,
Sample: http://www.syncfusion.com/downloads/support/directtrac/general/GridTreeSample513585299.zip
In the sample we have used CurrentCellValidating event to update the edited values in UnBoundColumn.
Code Snippet [C#]:
treeGrid.InternalGrid.CurrentCellValidating += InternalGrid_CurrentCellValidating;
void InternalGrid_CurrentCellValidating(object sender, CurrentCellValidatingEventArgs e) { GridTreeNode record = treeGrid.InternalGrid.GetNodeAtRowIndex(e.Style.RowIndex); var columnindex = this.treeGrid.InternalGrid.ResolveIndexToColumnIndex(e.Style.ColumnIndex);
if (this.treeGrid.Columns[columnindex].MappingName == "EmployeeCity") { var person1 = record.Item as Person1; if (person1 != null) { person1.EmployeeCity = e.NewValue.ToString(); } } else if (this.treeGrid.Columns[columnindex].MappingName == "EmployeeDesignation") { var person2 = record.Item as Person2; if (person2 != null) { person2.EmployeeDesignation = e.NewValue.ToString(); } } } |
Please let us know if you need further assistance.
Thank you,
Jai Ganesh S
Hi Jai,Have you actually ran this demo?The values in EmployeeCity and EmployeeDesignation randomly change as you hover over them as you've not linked the unbound columns to the underlying data model.As such, this demo is useless and demonstrates nothing of any value.- Adam