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.
Is there a way to read out the current order that the columns are displayed in the databoundgrid? Is there also a way to see if a particular column is visible or not? Thanks!
HAhaneefm Syncfusion Team June 28, 2007 11:40 PM UTC
Hi code1234,
Is there a way to read out the current order that the columns are displayed in the databoundgrid? >>>>>>>>>>>>>>>>>>>>>> Yes. You can get the bounded column collection orders by using the Binder.InternalColumn property.
foreach(GridBoundColumn c in gridDataBoundGrid3.Binder.InternalColumns) { Console.WriteLine(c.MappingName); } Is there also a way to see if a particular column is visible or not? >>>>>>>>>>>>>>>>>>>>>> You can try this code.
Rearrange the columns. >>>>>>>>>>>>>>>>>>>>> To position the columns in the grid, you can use the Binder.LayoutColumns() method. This method rearranges how the columns should be displayed in the grid. Below is the code snippet.
If columns from datasource are populated as Col1, Col2, Col3, Col4, Col5 then you can modify the order of the columns like...