Problem setting style of a column

2 posts, 0 answers
  1. ManniAT
    ManniAT avatar
    885 posts
    Member since:
    Nov 2003

    Posted 12 Jul 2009 Link to this post


    I tried to set the style of the name column with the following code (I know - now validation and so on -- it's just to the functionality):

    RadFileExplorer1.Grid.Columns[0].ItemStyle.CssClass =


    This works as expected - for the first 11 rows (the style changes the background color)
    After this I all rows are without that style (class).

    Using IE8 Devel I found that row 12 is:
    <tr class="rgNoRecords" style="display: none;">
    After this row the "Class" attribute for TD is no longer there.
    So row 11 looks like: (that's correct)
    <td class="Label" unselectable="on">
    And row 13 than:
    <td unselectable="on">



  2. Nikolay Rusev
    Nikolay Rusev avatar
    2289 posts

    Posted 13 Jul 2009 Link to this post

    Hello Manfred,

    ItemStyles is applied on the td element of the column in current item. As such it will not be applied on rows that are created whenever you are binding RadGrid to items more then initial(server-side) page size.

    You can apply this styles manually on RowDataBound event for instance.

    Best wishes,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top