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

Customizing the left key-Column Cell when using the Office2007Blue Grid Style

Thread ID:

Created:

Updated:

Platform:

Replies:

62267 Jun 12,2007 09:04 AM UTC Jun 12,2007 07:24 PM UTC WinForms 1
loading
Tags: GridControl
Nick Robinson
Asked On June 12, 2007 09:04 AM UTC

Hi,

I am using the GridControl from the Essential Suite version 5.1.0.51. When we set the GridVisualStyles to SystemTheme, our left column is shaded like a 3d button. Depending on state of a row, we also change the background colour and textcolour. However we upgraded the GridVisualStyles to Office2007Blue, and now we cannot do ANY customization of this column.

It makes sense we cant do the background because of the colourization thats happening for the Office2007Blue style. However, we could benefit from changing the textcolour but this doesnt seem to work.

Is it possible to render a little icon in this column instead?

Thanks for any help,

Nick.

Saravanan A [Syncfusion]
Replied On June 12, 2007 07:24 PM UTC

Hi Nick,

1, However we upgraded the GridVisualStyles to Office2007Blue, and now we cannot do ANY customization of this column.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
When you set the GridVisualStyles property, it will override the BackColor property of the header cells.
To workaround this, you can set the celltype to Static, in addition to setting the BackColor.
Here is the code snippet.

gridControl1[1, 0].BackColor = Color.Yellow;
gridControl1[1, 0].CellType = "Static";


To change the cell, back to the themed appearance, change the celltype to Header.
gridControl1[1, 0].CellType = "Header";

2, Is it possible to render a little icon in this column instead?
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
You can achieve this in two ways.

1, You can make the header cell to static cell and asign the icon to it by using ImageList and ImageIndex properties.
For more details, please refer to this related knowledge base article.
How do I include an icon in the column header for a GridControl and a GridDataBoundGrid?

2, Second way is to draw the icon on the header cell using Graphics.DrawImage method. For this you can use DrawCell event or CellDrawn event, which will be fired while drawing each cell in the grid. From the event argument you can check for the rowindex and column index to draw icons only on the required header cells.
Please refer to the following related forum threads.
http://www.syncfusion.com/support/Forums/message.aspx?MessageID=23698
http://www.syncfusion.com/support/Forums/message.aspx?MessageID=53422

Best Regards,
Saravanan

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

;