如何在jqgrid中更改行的特定单元格值 [英] How to change a row's particular cell value in jqgrid
本文介绍了如何在jqgrid中更改行的特定单元格值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想更改特定行的单元格值,我具有行ID.并且我尝试使用以下内容.但这不起作用.
I want to change a particular rows's cell value, I have the row Id. and I have tried using the following. But it doesnt work.
$("#my-jqgrid-table").jqGrid('setCell',rowId,'Currency', '12321');
我正在使用loadonce: true
请有人可以帮我这个忙.谢谢
Please can someone help me with this. Thanks
推荐答案
您可以使用getRowData
和setRowData
方法来实现此目的(它们直接与数据数组一起使用):>
You can use getRowData
and setRowData
methods to achieve this (they are working directly with data array):
var rowData = $('#my-jqgrid-table').jqGrid('getRowData', rowId);
rowData.Currency = '12321';
$('#my-jqgrid-table').jqGrid('setRowData', rowId, rowData);
这篇关于如何在jqgrid中更改行的特定单元格值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文