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

Chage Header BackColor on GridDataBoundGrid

Thread ID:





3452 Mar 20,2003 05:00 PM UTC Mar 21,2003 12:11 AM UTC WinForms 1
Tags: GridControl
Curtis Koppang
Asked On March 20, 2003 05:00 PM UTC

I have two data views of the same data. One is in a SyncFusion GridDataBoundGrid, the other is an owner drawn form. When the user selects something on the owner drawn form, I want to change the background color of the column header to show which column(s) they have selected. How can I do this? Most of the BackColor work I am doing is in the PrepareViewStyleInfo() event, but that event is not called. I need something which is explicit. Tx, curt

Administrator [Syncfusion]
Replied On March 21, 2003 12:11 AM UTC

You can force PrepareViewStyleInfo to be called by calling GridDataBoundGrid.RefreshRange. this.gridDataBoundGrid1.RefreshRange(GridRangeInfo.Cell(0,2)); //redraw col header 2 So if you want a header to be colored, set some flag (or something else that you can test in PrepareViewStyleInfo), and then call RefreshRange.


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