Reputation: 219
I have the jQuery object of table rows and I have use the following code snippet to insert the table row:
$(proxy._gridRows).eq(args.recordIndex).after(addedGridRow);
Here proxy._gridRows =Table Rows
args.recordIndex=0;
addedGridRow =html string for tr;
In this case row inserted into the first index. How to insert the table row in the 0th index?
Upvotes: 0
Views: 164
Reputation: 955
use prepend
on the table
as
table.prepend(row)
table is jquery table element
row is jquery tr element which you want to insert at 0th position in table
Upvotes: 1