Adding a class to a newly inserted row
Adding a class to a newly inserted row
tysonkoska
Posts: 2Questions: 0Answers: 0
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
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
This discussion has been closed.
Replies