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

how to change the Grid row color to be different

3 Answers 2476 Views
Grid
This is a migrated thread and some comments may be shown as answers.
YN
Top achievements
Rank 1
YN asked on 11 Sep 2019, 11:36 PM

Hello,

How to change the Grid row color to be color 1 in even number rows, and color2 in odd number rows.

Thanks!

3 Answers, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 16 Sep 2019, 02:00 PM
Hello YN,

You could achieve different colors for the alternating and non-alternating rows by using custom CSS rules. By default, the Grid rows have different classes for the alternate rows:

<style>
  .k-grid-content tr {
    background-color: orange;
  }
   
  .k-grid-content .k-alt {
    background-color: white; // specify the alternate background-color
  }
</style>

Please check the following example demonstrating this: http://dojo.telerik.com/IcorIseR

Hope this helps and please contact us back, if you have any further questions.

Regards,
Nikolay
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Vaishali
Top achievements
Rank 1
answered on 30 Mar 2021, 07:39 AM

Hi,

 

Tried this one but it is not working. Working with Angular kendo grid. 

Can you please help us to change grid color with desired one ?

 

Thanks,

Vaishali,

0
Nikolay
Telerik team
answered on 02 Apr 2021, 06:21 AM

Hello Vaishali,

I just tested the provided styles in a Grid integrated with AngularJS and it seems they are working just fine:

https://dojo.telerik.com/OWaHImEf

In case you are having a Kendo UI for Angular Data Grid, I recommend submitting a new thread choosing the correct product so the relevant team handles the inquiry. The Kendo UI for Angular is another product that has a separate dedicated team working on it.

Regards,
Nikolay
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Grid
Asked by
YN
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Vaishali
Top achievements
Rank 1
Share this question
or