We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

set colstyle

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

1 Reply

AD Administrator 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.

Loader.
Live Chat Icon For mobile
Up arrow icon