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

Setting the celltype of an entire column

Thread ID:





23222 Jan 6,2005 07:25 PM UTC Jan 6,2005 08:35 PM UTC WinForms 2
Tags: GridControl
Stephen Trinder
Asked On January 6, 2005 07:25 PM UTC

Is it possible to set the celltype of an entire column? For example: I have a dataset with 10 rows and 5 columns that I pass to the grid to populate. I always want column 3 to contain a checkbox. Is there anyway of doing this short of selecting the column as a range, expanding it, then looping through the GetNextCell method and setting each cell individually?

Administrator [Syncfusion]
Replied On January 6, 2005 08:29 PM UTC

If this is a GridDataBoundGrid, the you set teh style information for a column using the GridBoundColumn.StyleInfo property. You get this object either using the grid.GridBoundColumns collection if you have explicily added GridBoundColumns either using the designer or from code. If you have not explicitly added GridBoundColumns, then you access the GridBoundColumn from the grid.Binder.InternalColumns collection. Check out this KB for some code snippets. If this is a GrodControl, you use the grid.ColStyles collection to set the style information for a column.

Administrator [Syncfusion]
Replied On January 6, 2005 08:35 PM UTC

It was a gridcontrol, so the ColStyles is the answer. Great! Thank you!


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