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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Layout Columns

Thread ID:

Created:

Updated:

Platform:

Replies:

63246 Jun 30,2007 12:22 AM UTC Jul 2,2007 05:38 AM UTC WinForms 1
loading
Tags: GridControl
John
Asked On June 30, 2007 12:22 AM UTC


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 05:38 AM UTC

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.

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

;