如何在jqgrid中找到最后一行 [英] How to find the last row in jqgrid

查看:694
本文介绍了如何在jqgrid中找到最后一行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前,我正在研究jqgrid,在这里我必须找出最后一行并实现ctrl down功能.但是目前我无法获得最后一行.

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.

这里需要一些帮助.

预先感谢

推荐答案

如果网格ID例如list,则以下表达式应返回最后一行:

If the grid id is for example list then the following expression should return you the last row:

$("#list").find(">tbody>tr.jqgrow:last");

$("#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];

它使用<table>的DOM表示形式的集合.值$(lastRowDOM)将与$("#list").find(">tbody>tr.jqgrow").filter(":last")相同.

It uses the rows collection of DOM representation of <table>. The value $(lastRowDOM) will the same as $("#list").find(">tbody>tr.jqgrow").filter(":last").

这篇关于如何在jqgrid中找到最后一行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆