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.
Hello,
When I attach a data set to a data bound grid,
the columns order in the grid is derived from the fields order in the data set.
Is there a way I can control\override the columns order at runtime? (without changing the fields order in the data set offcourse...)
Thanks in advance,
Gil K
ADAdministrator Syncfusion Team May 23, 2004 10:04 AM UTC
You create GridBoundColumn objects for each column you want to see, and add them to the grid.GridBoundColumns collection using grid.GridBoundColumns.Add. The grid should only show the columns in this collection, and in the order that you set them. (For each GridBoundColumn object, make sure you set its MappingName property to the ColumnName for the column in your DataTable. This is how th egrid identifies the columns, and it is case sensitive.)