Adding a class to a newly inserted row

Adding a class to a newly inserted row

tysonkoskatysonkoska Posts: 2Questions: 0Answers: 0
edited December 2013 in General
I'm new to javascript and this is a basic question, but after searching, can't find the answer...

Per the "User selectable rows (single row) and delete rows" example, I am using the .addClass function to select/hightlight a row. I'm having trouble selecting a row when adding new rows (using fnAddData) - I want the new row to be selected/highlighted after it's added.

I see that fnAddData returns an index value for the new row, but I don't know how to use that index to apply the 'row_selected' class.

I also see that there is a fnCreatedRow function which can be used as a "Call Back", but I'm having trouble understanding how that works. Any general advice or pointers would be greatly appreciated!
Tyson

Replies

  • tysonkoskatysonkoska Posts: 2Questions: 0Answers: 0
    Nevermind... simply had to use the fnGetNodes function to the get the TR element with the index that I had. Please close, thanks.
This discussion has been closed.