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.
Syncfusion Feedback

Re-binding grid doesn''t display data for extra columns

Thread ID:

Created:

Updated:

Platform:

Replies:

71892 Feb 19,2008 02:53 PM UTC Mar 4,2008 05:52 PM UTC WinForms 1
loading
Tags: GridControl
Kishor
Asked On February 19, 2008 02:53 PM UTC

Hi,
In my win from application I am using Syncfusion grid for dynamicaly binding to different datasources depending upond some business need. However number of columns are different in each data source. Also for each type of data source I am saving the columns order to .egt file and retrieving it when I am binding specific type of data source. However if i have two datasources say ds1 & ds2 and if I bind ds1 (with 10 columns) and then ds2 (with 8 columns) and again ds1 then grid is showing data for only 8 columns (even though it is expected to show data in 10 columns) and it is not showing any data & header text for last two columns. It just displays blank column. Please note that I am loading column order every time I am binding the data source.
I will appreciate your help on this.
Thanks,
Kishor


Administrator [Syncfusion]
Replied On March 4, 2008 05:52 PM UTC

Hi Kishor,

Thank you for your interest in Syncfusion Products.

To rebind the datasource of the GridGrouping control, we need to reset the TableDescriptor and also datasource should be set to null. The following code snippet illustrates this:

this.gridGroupingControl1.SuspendLayout();
this.gridGroupingControl1.ResetTableDescriptor();
this.gridGroupingControl1.TableDescriptor.Relations.Reset();
this.gridGroupingControl1.DataSource = null;
this.gridGroupingControl1.DataMember = null;
this.gridGroupingControl1.DataSource = newdatasource;
this.gridGroupingControl1.ResumeLayout(true);

Please find the simple sample in the following link:
http://websamples.syncfusion.com/samples/Grid.Windows/F71892/main.htm

Please let me if this helps.

Regards,
Srirajan



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.

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

;