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.

Layout Columns

Thread ID:

Created:

Updated:

Platform:

Replies:

63246 Jun 29,2007 08:22 PM Jul 2,2007 01:38 AM Windows Forms 1
loading
Tags: GridControl
John
Asked On June 29, 2007 08:22 PM


Hi,

I use this code to reorder the columns:

this.gridDataBoundGrid1.Binder.LayoutColumns(new string[] {"Col1", "Col2", "Col3", "Col4", "Col5"});


Then, I purposely leave out Col5 because I don't want it shown in the grid:

this.gridDataBoundGrid1.Binder.LayoutColumns(new string[] {"Col1", "Col2", "Col3", "Col4" });


Then, I try to put Col5 back visible again:
this.gridDataBoundGrid1.Binder.LayoutColumns(new string[] {"Col1", "Col2", "Col3", "Col4", "Col5"});

But Col5 shows up in the grid without headertext and the rows are all blank? How do I rebind Col5 back to the databoundgrid? Thanks!


Jeba S [Syncfusion]
Replied On July 2, 2007 01:38 AM

Hi coder12345,

You can rebind Col5 back to the databoundgrid using this code snippets:

this.gridDataBoundGrid1.DataSource = null;
this.gridDataBoundGrid1.Binder.ResetHierarchyLevels();
this.gridDataBoundGrid1.DataSource = dt;
this.gridDataBoundGrid1.Binder.LayoutColumns(new string[] { "Col1", "Col2", "Col3", "Col4", "Col5"});


Kindly let us know if this helps.

Best Regards,
Jeba.

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.

;