Alternate Row CSS in Pivot Grid

2 posts, 0 answers
  1. Amit
    Amit avatar
    3 posts
    Member since:
    Nov 2011

    Posted 05 Feb 2013 Link to this post

    How to apply alternate row css in pivot grid?
    If there is not any inbuilt method provided, please let me know custom way(s) to avail alternate row css in pivot grid.

    Thanks in advance.

  2. Galin
    Admin
    Galin avatar
    526 posts

    Posted 08 Feb 2013 Link to this post

    Hello Amit,

    You can achieve this by using CSS 3, which is supported only in modern browsers
    .rpgContentZoneDiv tr:nth-child(2n)
    {
        background: grey;
    }

    Also, the cross browser solution is to use Js and CSS
    function onPivotGridCreated(sender)
    {
        $telerik.$("tbody tr:odd", sender.get_dataDiv()).addClass("altRow");
    }

    .rpgContentZoneDiv tr.altRow
    {
        background: grey;
    }

    I hope this helps.

    Kind regards,
    Galin
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top