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

GridGroupingControl problem

Thread ID:

Created:

Updated:

Platform:

Replies:

18414 Aug 30,2004 01:56 PM Mar 15,2005 05:44 AM Windows Forms 9
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On August 30, 2004 01:56 PM

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 03:56 PM

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 05:52 AM

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

Shankar Ramasubramanian
Replied On March 14, 2005 10:23 AM

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 2.0.5.1

Administrator [Syncfusion]
Replied On March 14, 2005 11:54 AM

You should probably upgrade. In 3.0, we ship a sample, \Syncfusion\Essential Suite\3.0.1.0\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 02:39 PM

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 2.0.5.1. I would like to use upgrade to 3.0 as last option. Thanks shankar

Shankar Ramasubramanian
Replied On March 14, 2005 02:59 PM

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

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

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

Shankar Ramasubramanian
Replied On March 14, 2005 03:58 PM

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 05:44 AM

The only way I would know to get this reliably donne in 2.0.5.1 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.

CONFIRMATION

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.

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.

;