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.
ADAdministrator Syncfusion Team July 13, 2004 08:45 AM
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.