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

Chage Header BackColor on GridDataBoundGrid

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

1 Reply

AD Administrator Syncfusion Team March 20, 2003 07:11 PM

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.

Loader.
Live Chat Icon For mobile
Up arrow icon