简体   繁体   English

如何使用行ID获取行数据

[英]How to get row data using row id

var $grid = $("#grid"),  
var dataFromTheRow = jQuery('#grid').jqGrid ('getRowData', rowId); 

Tried this but no luck. 尝试了这个,但没有运气。

As commented before rowId should be valid - ie row with this id should exists. 如前所述,rowId应该有效-即具有该ID的行应该存在。 If you do not know the id of the rows you can use the method getDataIDs to see all the available id of the rows 如果您不知道行的ID,则可以使用getDataIDs方法查看行的所有可用ID。

你可以试试:

var dataFromTheRow = jQuery('#grid').getRowData(rowId); 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM