alternating row color on Grid
Is there a way to set alternating colors in a grid?
Catch up wih the Appery.io community on our forum. Here you'll find information on the lastest questions and issues Appery.io developers are discussing.
https://forum.appery.io/
Is there a way to set alternating colors in a 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
(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?
Hi, replied here https://getsatisfaction.com/apperyio/...