Hi,
I use AspxGridView and Aqua theme. I have grid with lot of columns and I need chance color of column header to different as green, red by some condition.
Is it posible and how can I do It.
Thanks for help
Martin Radvansky
ASPxGridView - Change color of Column header by condition when using theme
Answers
Hi Martin,
You can set the column header color using the GridViewColumn.HeaderStyle.BackColor property. If you are using some theme, the header cell contains an image, which covers the cell area.
To overcome this issue, remove the backround-image property from the dxgvHeader_Aqua css class and set the column header color.
CSS.dxgvHeader_Aqua {
...
/*background-image: url('gvHeaderBackground.gif');*/
...
}
ASPx...
<dxwgv:GridViewDataTextColumn FieldName="CategoryName" VisibleIndex="1">
<HeaderStyle BackColor="Green" />
</dxwgv:GridViewDataTextColumn>
...
I've created a sample project with this solution. It's attached. Please see it, and let us know if this helps.
Thanks,
Ruslan
Hello,
Would you please describe your scenario in greater detail? Please clarify what you mean by "how to apply that in devexpress Razor".
We greatly appreciate your time and cooperation.
[DX Support team: this comment was created from the Owner's answer]
I didn't find any css
.dxgvHeader_Aqua {
…
/*background-image: url('gvHeaderBackground.gif');*/
…
}
Please let me know where will i get and and how to make the changes.
Hi,
you can use the ASPxThemeDeployer tool to copy the specific Theme's source files into the project's App_Theme folder.
Please refer to the following link for the step-by-step instructions on how to use this tool.
Using ASPxThemeDeployer.