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 have a grouping grid and bound to a DataSet. What is the easiest way of setting properties for various columns? At the moment I''ve got:
grid.TableDescriptor.Columns["MyColumn"].HeaderText = "My Column";
grid.TableDescriptor.Columns["MyColumn"].Width = 40;
and so on. I was want to adjust the order of columns, the only way I can see of doing this is to use grid.TableDescriptor.Move which requires column indexes.
Thanks,
Ben.
ADAdministrator Syncfusion Team June 10, 2004 09:52 AM UTC
Hi Ben,
there are multiple ways to rearrange columns:
The column order can be modified by adding columns in the the order you want them to appear to the GridTableDescriptor.VisibleColumns collection.
Example:
this.groupingGrid1.TableDescriptor.VisibleColumns.Add("CustomerID");
this.groupingGrid1.TableDescriptor.VisibleColumns.Add("CompanyName");
Or you could also add them in the order you want them to appear to the GridTableDescriptor.Columns collection (see the CategoryView example).
The designer also lets you modify the order of columns through collection editors when you click on the ellipsis button of the "Columns" or "VisibleColumns" collection. The "Preview and Edit" mode in design time also lets you drag columns around.
Stefan