John T
Posts: 0
Joined: Tue Jun 04, 2013 8:43 pm

alternating row color on Grid

Is there a way to set alternating colors in a grid?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

alternating row color on Grid

Hi John,

Each line (tag tr) has a class with name:
_row_number_from_0_to_N

For example:
mobilegrid1_row_0
mobilegrid1_row_1
mobilegrid1_row_2
mobilegrid1_row_3
mobilegrid1_row_4

You can use styles. To color rows run:
code// paints all even rows (including zero) in red
Appery("mobilegrid_2").find("tr:even").css("background", "red");

// paints not even lines in green
Appery("mobilegrid_2").find("tr:odd").css("background", "green");

//adds a class only to even rows
Appery("mobilegrid_2").find("tr:even").addClass("sameClassForEvenRows"); /code

Rahul Chidgopkar
Posts: 0
Joined: Tue May 14, 2013 7:11 am

alternating row color on Grid

(Reposting this question from another thread)

I have a question on similar lines. I am showing a set of results in a grid. Two of those columns receive binary data. If either column receives false, I want to highlight the entire row in red color.

How can I highlight the entire row based on data in particular columns?

Return to “Issues”