Currently i'm working on the jqgrid, where i have to find out the last row and implement the ctrl down functionality. But currently i could not able to get the last row.
Needed some one help here.
Thanks in advance
Currently i'm working on the jqgrid, where i have to find out the last row and implement the ctrl down functionality. But currently i could not able to get the last row.
Needed some one help here.
Thanks in advance
If the grid id is for example list
then the following expression should return you the last row:
$("#list").find(">tbody>tr.jqgrow:last");
or
$("#list").find(">tbody>tr.jqgrow").filter(":last");
One more, event better, way to get the last row is the following
var rows = $("#list")[0].rows,
lastRowDOM = rows[rows.length-1];
It uses the rows collection of DOM representation of <table>
. The value $(lastRowDOM)
will the same as $("#list").find(">tbody>tr.jqgrow").filter(":last")
.
For 4.6.0 version above
$("#list tbody:first tr:nth-child(2)").attr('id');
For me working fine using 4.6.0 version