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.
Hi,
Currently, I''m using the GridControl. I want to set column style through the column name not col index.
if I use following code:
style = Me.GridControl1.ColStyles("Long Qty").
it seems set style for all the columns not just for "Long Qty". If I use column index, everything is ok.
Thanks a lot.
--Shuyang he
ADAdministrator Syncfusion Team July 13, 2004 12:45 PM UTC
Using names to access column collections in a GridControl is only supported if you use a derived GridModel which overrides GridModel.NameToColIndex and implements a mapping between the column name and the column index.
So, by default you would not be able to do this without deriving GridModel and overriding NameToColIndex. Then when you create your GridControl, you would want to use a constructor that lets you pass an instance of your GridModel class.