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.

Reorder GridDataBoundGrid columns programatically

Thread ID:





44550 May 26,2006 04:02 AM May 26,2006 04:55 AM Windows Forms 1
Tags: GridControl
Nick Gardner
Asked On May 26, 2006 04:02 AM

I''m implementing a column builder to allow the user to set (from a custom form) which columns are visible and their display order. I''ve sorted out the visible side of things using Model.Cols.Hidden, how can I set the order from code? The grid displays data from a DataView based on a DataTable.

Administrator [Syncfusion]
Replied On May 26, 2006 04:55 AM

Hi Nick, To rearrange the columns of the grid, you need to use the Binder.LayoutColumns(). The LayoutColumns() rearranges how the columns should be displayed in the grid and allows you to specify covered cells and / or break records into several rows displayed in the grid. Here is some code snippet this.gridDataBoundGrid1.Binder.LayoutColumns( "Id","Points","Name"); Here is a sample. http://www.syncfusion.com/Support/user/uploads/contextMenu_fb5f7280.zip Please let me know if this helps. Best Regards, Haneef Please note : "-" indicates a covered cell, "." indicates a new row, "" specifies an empty "whitespace" column.


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.