The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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.
ADAdministrator Syncfusion Team May 26, 2006 08:55 AM UTC
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.