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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

set colstyle

Thread ID:





16343 Jul 13,2004 12:34 PM UTC Jul 13,2004 12:45 PM UTC WinForms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On July 13, 2004 12:34 PM UTC

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

Administrator [Syncfusion]
Replied On 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.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon