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.
In the GridControl, is there a way to refer to a Column by name rather than index? This was a useful feature in the grid control I'm migrating from and meant I didn't have to use "magic numbers" when populating cells. For example: I would set a name property (or something similar) on each column in the grid - say "FirstName", "LastName" Then, when populating the grid I would be able to use something like: GridControl1(rowIndex, "FirstName").Text = "Richard" GridControl1(rowIndex, "LastName").Text = "Smith"
Similarly, I would be able to refer to ColStyles using name or index: GridControl1.ColStyles("FirstName").BackColor = Color.Red
HAhaneefm Syncfusion Team July 10, 2007 10:06 PM UTC
Hi Richard,
There is no built-in support for this. But you can map column index from its column name in a grid. Below is a forum thread that discuss with similar issue.
That's ok for getting the alpha name from the index, but not the other way round
GetAlphaLabel(1) would return "A"
I really need GetColIndex("A"). I suppose this isn't available in the GridControl because data is copied into the grid rather than remaining bound to the datasource?
HAhaneefm Syncfusion Team July 12, 2007 09:23 PM UTC