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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How can I colour a whole column except headers?

Thread ID:

Created:

Updated:

Platform:

Replies:

51016 Oct 26,2006 09:29 AM UTC Oct 26,2006 10:49 AM UTC WinForms 2
loading
Tags: GridControl
David Hook
Asked On October 26, 2006 09:29 AM UTC

Hi

Can anyone help me in working out how to colour a whole column (with the exception of the header which I want kept a different colour) so as I add more rows they will automatically get added with the columns colour?

I've used the cell.backcolor to colour the cells as I fill them with data, but when I add rows to different columns I then get left with 'white' background on the new rows on other columns. Potentially each column in the grid could be a different colour background.

Thanks in advance,

David

Administrator [Syncfusion]
Replied On October 26, 2006 10:19 AM UTC

Hi David,

Use the Model.ColStyles property of the GridModel to manage the appearance of the column in a grid. Below is a code snippet

this.grid.Model.ColStyles[1].BackColor = Color.Green;

Best Regards,
Haneef

David Hook
Replied On October 26, 2006 10:49 AM UTC

Thanks Haneef

Perfect!

David

CONFIRMATION

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.

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

;