How to change style for specific column in webdatagrid?
Please help me!!
Thanks in advance!!
Hello Prakash,
In order to set CSS class to specific column you could use the following properties CssClass, which defines the style of each cell in this column and the Header-CssClass, which will set the style for the header of the column. The following markup demonstrates how this could be achieved:
<style>
.custom-header {
background-color:green !important;
color:white!important;
}
</style>
……………………………..
<ig:BoundDataField DataFieldName="ID" Key="Id" Header-CssClass="custom-header" >
<Header Text="Id">
</Header>
</ig:BoundDataField>
Please note that the !important property should be used, otherwise the default CSS of the grid would be applied.
Please let me know if you need any further assistance.
Regards, Ivan Kitanov
Not a header, how style specific column.
I’m attaching a screenshot that demonstrates the use of the Header-CssClass and the CssClass property of the column. In case you would like to style all the cells in the column, use the CssClass property.
If using those properties is not sufficient for the needs of your application, could you elaborate more on what specific styling you are looking for?
Additionally I would like to share the following styling guide, that demonstrates how specific parts of the grid could be styled.