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

Specifying new datasource for GridGroupingControl

i will give a brief description on my scenario. i have a dataset, containing 2 datatables. there is a relation binding the 2 tables. the gridgroupingcontrol.datasource is assigned to the dataset. i was able to get the view i want during the first datasource specification. however, when i assign the control to another dataset, i was given the error message saying that the relationship contain error. i figured that the error could be caused by the control attempting to draw the previous dataset when a new dataset is assigned to it. thus the relation failed. i was wondering how should i get around this situation. thanks and regards.

4 Replies

AD Administrator Syncfusion Team May 4, 2004 06:58 PM UTC

You can try resetting the relations. You could also reset the DataMember. this.gridGroupingControl1.TableDescriptor.ResetRelations(); this.gridGroupingControl1.DataSource = newDataSource; this.gridGroupingControl1.DataMember = ""; //or whatever else is appropriate


LK Lance Koh May 5, 2004 02:45 AM UTC

i tried, but nope, it did not work. and i am still facing the same problem...


AD Administrator Syncfusion Team May 5, 2004 05:18 AM UTC

Instead of ResetRelations, try this.gridGroupingControl1.TableDescriptor.Relations.Clear(); This seems to work in this sample. GGC_NOParentHreader_5854.zip


LK Lance Koh May 5, 2004 02:35 PM UTC

looks cool! i will explore into that area. thanks!

Loader.
Live Chat Icon For mobile
Up arrow icon