Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
205
Webdatagrid column styling
posted

How to change style for specific column in webdatagrid?

Please help me!!

Thanks in advance!!

Parents
  • 1660
    Offline posted

    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

Reply Children
No Data