Hi All,
I am using DynaMetapush table with one row template.How can i have alternate coloring for the rows added to the table?Since i am having one row template i can only provide the style for that row ..which gets repeated.
Regards,
George Eapen
Printable View
Hi All,
I am using DynaMetapush table with one row template.How can i have alternate coloring for the rows added to the table?Since i am having one row template i can only provide the style for that row ..which gets repeated.
Regards,
George Eapen
The problem with DynaMetapush tables is also that rows can shift, because of insertions or deletions; in that case, the DOM element containing the row values does not change, so it should change its color according to the new position.
You can see this thread, where only unchecked suggestions are provided.
To add one more, if your needs only involve the row background, maybe it is possible to define transparent template rows over an alternate background.
I checked the thread http://www.lightstreamer.com/vb/show...light=altering.
"In example you could store the dom references given by the onChangingValues and change the rows colors on the basis of the data you receive, or you could try even and odd rules as shown here (note that I'm not sure this would work as I have no time to test it at the moment, btw if you can give it a try please let us know your results)"
In the excerpt above of the thread 2 approaches are specified for alternate coloring.I tried the second odd and even coloring using css but unfortunately its not supported in IE/firefox.
Can u explain how the first approach using DOM reference can be accomplished .
Hi,
thinking about it I'm not sure it is feasible as the "change color to your rows" approach involves a main problem whenever two rows have the same value on the sorted column and you couldn't know which one is shown on top by our sorting algorithm.
Btw such approach consist on tracking the position of each row knowing the sort field and the sort values. Having such information you should store somewhere the DOM references to each row that is given through the onChangingValues callback and then change row colors accordingly. As said in the other post it's a little bit tricky.
Btw, I think that Dario's advice was the best one: you could use fixed height rows with no background and a background image to obtain the alternate rows.
You can see an example of a table with a background on our homepage
HTH
ok..i wil do it with bg image..thank you very much.