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

How to style a certain Row in a Grid

2 Answers 163 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rhys
Top achievements
Rank 1
Rhys asked on 01 Mar 2012, 07:03 PM
Hi,

I am trying to style certain rows within a grid.  For example I would like to have the 4th row in a Grid have a specific class associated with it.  What is the best way to accomplish this?

Many Thanks!
Rhys

2 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 02 Mar 2012, 10:19 AM
Hi Rhys,

To achieve the desired result, please use the Grid's dataBound event and apply your custom CSS class to the given row(s) via standard DOM operations.

All the best,
Dimo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Boone
Top achievements
Rank 2
answered on 02 Mar 2012, 10:24 PM
Try this:

dataBound: function () {
                    $("#grid tbody tr:eq(4)").addClass("customClass");
                }
Tags
Grid
Asked by
Rhys
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Boone
Top achievements
Rank 2
Share this question
or