Page 1 of 1

alternating row color on Grid

Posted: Thu Jun 06, 2013 7:03 pm
by John T

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


alternating row color on Grid

Posted: Thu Jun 06, 2013 7:46 pm
by Kateryna Grynko

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


alternating row color on Grid

Posted: Fri Jun 21, 2013 8:19 am
by Rahul Chidgopkar

(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?


alternating row color on Grid

Posted: Fri Jun 21, 2013 10:17 am
by Maryna Brodina