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

The structure of the syncfusion grid Grouping control is not changing!

Hi,

I am assigning a DATASource table1 with some structure to the syncfusion grid Grouping control for the first time,next when I'm assgining a DATASource table2 with different structure the grid structure is not changing.it is Showing table1 Structure only.

Please any one help if they can!


Thanks & regards,
Ramana.


3 Replies

YG Yavanaarasi G Syncfusion Team May 8, 2008 01:24 PM UTC

Hi Ramana,

I am not able to reproduce the issue that you mentioned here. I have created a simple Gridgrouping sample with two datatable. During the page load the first table is binded. Then in button click I have binded the next tabel. Here it works.

Please refer the sample in the below link which illustrates the above:

http://websamples.syncfusion.com//samples/Grid.Windows/F-73433/main.htm

Please have a look at the above sample and if still the issue exists, could you please try reproducing it in the above sample and send us the modified sample so that we could sort out the cause of the issue and provide you a solution?


Regards,
G.Yavana




RA Ramana May 10, 2008 11:02 AM UTC


For GridGroupingcontrol :
In the Form I am retrieving The data from database to dataSet, then i am assigning the data to grid like:
gridgroupingcontrol1.DataSource=ds.Tables[0];
here I am disabling the some fields like
gridgropuingcontrol1.visiblecolumns.Remove("Columnname");

after showing the form
I am clicking the Button in this clickevent

once again I am retrieve the data from different table to dataset
then i am assigning like :
gridgroupingcontrol1.DataSource=ds.Tables[0];
in this
the columns are showing the first table columns only.





SR SubhaSheela R Syncfusion Team May 13, 2008 12:24 PM UTC

Hi Ramana,

Thanks for your update.

If you trying to rebind a datasource, you have to reset the DataSource before rebinding it. You can follow the below code snippets for rebinding a DataSource in GridGroupingControl.

Below is the code snippet:


this.gridGroupingControl1.DataSource = null;
this.gridGroupingControl1.DataMember = null;
this.gridGroupingControl1.ResetTableDescriptor();
this.gridGroupingControl1.TableDescriptor.Relations.Clear();
this.gridGroupingControl1.DataSource = ds.Tables[1];
this.gridGroupingControl1.Reinitialize();
this.gridGroupingControl1.Refresh();


Here is the sample:

http://websamples.syncfusion.com/samples/Grid.Windows/Grid_WF_GGCRebindingDataTable_F73433FU1/main.htm

Please have a look into the above sample and let me know if you need any further assistance.

Regards,
Subhasheela R



Loader.
Live Chat Icon For mobile
Up arrow icon