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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridGroupingControl problem

Thread ID:





18414 Aug 30,2004 05:56 PM UTC Mar 15,2005 10:44 AM UTC WinForms 9
Tags: GridControl
Administrator [Syncfusion]
Asked On August 30, 2004 05:56 PM UTC

I have a GridGroupingControl where the datasource is bound to a table in a dataset. If I change the datasource to another table, the grid still displays the previous table''s columns and they are all empty! How do I change the datasource to another table such that the grid shows the data from the new table correctly? TIA

Administrator [Syncfusion]
Replied On August 30, 2004 07:56 PM UTC

Try this code: gridGroupingControl1.DataSource = null gridGroupingControl1.DataMember = null gridGroupingControl1.ResetTableDescriptor() gridGroupingControl1.DataSource = newDataTable gridGroupingControl1.TableDescriptor.SetItemProperties(gridGroupingControl1.Engine.GetSouceList()) gridGroupingControl1.Table.TableDirty = True gridGroupingControl1.Table.SummariesDirty = True gridGroupingControl1..Refresh()

Administrator [Syncfusion]
Replied On August 31, 2004 09:52 AM UTC

With the latest version ( and later), the only call that should be necessary is ResetTableDescriptor().

Shankar Ramasubramanian
Replied On March 14, 2005 03:23 PM UTC

Clay, I tried the exact same code that you posted. It didn''t work. When I bind the datasource for the very first time,every thing is okay. The next time nested table is empty and the thrid time the top level table is empty. Syncfusion

Administrator [Syncfusion]
Replied On March 14, 2005 04:54 PM UTC

You should probably upgrade. In 3.0, we ship a sample, \Syncfusion\Essential Suite\\Windows\Grid.Windows\Samples\Grouping\GridGroupingRebind, that shows rebinding working. When using nested tables, you also should call this.gridGroupingControl1.TableDescriptor.Relations.Reset();

Shankar Ramasubramanian
Replied On March 14, 2005 07:39 PM UTC

gridGroupingControl1.TableDescriptor.Relations.Reset(); I don''t see that method. I tried to gridGroupingControl1.TableDescriptor.Relations.RemoveAt(0) and this didn''t work either. Is there anyway to make it work in I would like to use upgrade to 3.0 as last option. Thanks shankar

Shankar Ramasubramanian
Replied On March 14, 2005 07:59 PM UTC

I tried gridRequests.TableDescriptor.ResetRelations(). This didn''t work either

Administrator [Syncfusion]
Replied On March 14, 2005 08:08 PM UTC

Try gridGroupingControl1.TableDescriptor.Relations.Clear() . It will be later tomorrow before I have access to 2051.

Shankar Ramasubramanian
Replied On March 14, 2005 08:58 PM UTC

Clay, gridGroupingControl1.TableDescriptor.Relations.Clear() did not work either. I got runtime error argument out of range. childtabledescriptor. m_childTableDescriptor = gridRequests.TableDescriptor.Relations(0).ChildTableDescriptor This line appears after i relations.clear and bind the datasource. Any help would be greatly appreciated

Administrator [Syncfusion]
Replied On March 15, 2005 10:44 AM UTC

The only way I would know to get this reliably donne in is to dispose and recreate the gridgroupingcontrol. http://www.syncfusion.com/Support/user/uploads/ResetData2051_e6ae9f92.zip If you update to the current release, you could avoid this.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon