Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2008

    Altering Row Color for Even and Odd Keys

    Hi Guys

    Is there a way for me to be able to alter a row color of odd and even numbered rows using the DynaMetapushTable?

    One of the threads I came across had:

    itemUpdate.setRowAttribute("red","","backgroundCol or");

    Assuming that this works how would I determine whether the row is an odd or even row or a key is an odd or even key.

    Thank you!

    - garyj

  2. #2
    Power Member
    Join Date
    Jul 2006
    Cesano Maderno, Italy
    i fear that accomplish such task could be a little bit tricky.
    First of all note that the setRowAttribute method does not affect the entire template but affects all lightstreamer's cells inside the template. Btw note that the onChangingValues gives to you a reference to the entire container (ie: the template clone) so that you can do any kind of manipulation on it.
    Our library does not give to you the position of a row in the table nor a callback to signal that a row has changed position, so to reach your goal you have to go through a more complicated way.
    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)




Similar Threads

  1. Replies: 8
    Last Post: March 25th, 2010, 09:02 AM
  2. Replies: 1
    Last Post: November 2nd, 2009, 04:55 PM
  3. Replies: 4
    Last Post: March 19th, 2008, 10:10 AM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
All times are GMT +1. The time now is 03:54 PM.