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 and Dynamic DataSource

Thread ID:

Created:

Updated:

Platform:

Replies:

52590 Nov 30,2006 12:05 PM Dec 1,2006 09:56 AM Windows Forms 2
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On November 30, 2006 12:05 PM

Hello. I am having an issue with dynamically changing the DataSource (all of my DataSource objects are strongly-typed custom object collections) on my GridGroupingControl. If I simply leave the TableDescriptor columns unmodified, I can null out the DataSource columns, reset the TableDescriptor and attach the new DataSource (as displayed in the Syncfusion\Essential Studio\x.x.x.xx\Windows\Grid.Grouping.Windows\Samples\GridGroupingRebind) and everything behaves as expected.

The problems occur, however, when I programmatically manipulate the columns that I want to display in the grid, based on my changing DataSource. The initial process of "define columns, bind DataSource" works as expected, but subsequent iterations generate an issue. After the first change of the DataSource, the grid no longer displays anything - columns, data, etc. There are no errors being generated (as near as I can tell), and the databinding is successful, because I can see the vertical scroll bar appearing and disappearing as I set DataSources with varying numbers of records. The steps as defined in the Syncfusion sample, though, do not resolve my issue as I would like.

I have tried defining my columns before AND after the binding of the DataSource, with the same results: an empty white box where the grid should be.

What is causing this issue, and what can I do to resolve it?

Administrator [Syncfusion]
Replied On December 1, 2006 08:08 AM

Hi John,

Before you set the datasource for the grid, you need to clear the columns and unbound columns using the Clear() method and then add the columns. Please refer to the attached sample for implementation.

Sample : GGC_ResetDataSource.zip

Best Regards,
Haneef

Administrator [Syncfusion]
Replied On December 1, 2006 09:56 AM

Hi Haneef,

My problem has been solved. Thanks for your assistance!

>Hi John,

Before you set the datasource for the grid, you need to clear the columns and unbound columns using the Clear() method and then add the columns. Please refer to the attached sample for implementation.

Sample : GGC_ResetDataSource.zip

Best Regards,
Haneef

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.

;