This is a migrated thread and some comments may be shown as answers.

Alternate Row CSS in Pivot Grid

1 Answer 90 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
Amit
Top achievements
Rank 1
Amit asked on 05 Feb 2013, 01:50 PM
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.

1 Answer, 1 is accepted

Sort by
0
Galin
Telerik team
answered on 08 Feb 2013, 11:49 AM
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.
Tags
PivotGrid
Asked by
Amit
Top achievements
Rank 1
Answers by
Galin
Telerik team
Share this question
or