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
close icon

How do I customise how the row headings are rendered on a GridControl

Hi,

We currently customise the column headings in our Syncfusion.Windows.Forms.Grid.GridControl grid using a GridHeaderCellRenderer.

How do I go about customising how the row heading? (i.e. where the row numbers normal appear)

Thanks,

Andrew


2 Replies

SR SubhaSheela R Syncfusion Team January 3, 2008 12:52 PM UTC

Hi Andrew,

Thank you for using Syncfusion products.

You can customize the row heading using GridHeaderCellRenderer class. But for simple customization like changing the color you can use BaseStylesMap. Please refer the below code snippet to achieve this:

this.gridControl1.Model.BaseStylesMap["Row Header"].StyleInfo.Interior = new BrushInfo(GradientStyle.Vertical, Color.Red, Color.FromArgb(197, 222, 255));

Kindly refer to the link below that illustrates the same:
http://websamples.syncfusion.com/samples/Grid.Windows/F70472/main.htm
Please let me know if you have any other questions.

Regards,
Subhasheela R.




GJ Glenn Jones December 2, 2009 06:22 PM UTC

Hi,

I am trying to do something like this, too. I would like to have the headers that correspond to the current cell highlighted. I have a solution, but it only works with ThemesEnabled = false. Is there a theme-friendly way of highlighting a header cell in the grid?

Thanks
Glenn

Loader.
Live Chat Icon For mobile
Up arrow icon