如何在 JQGrid 中获取单元格值? [英] How to get a cell value in JQGrid?

查看:33
本文介绍了如何在 JQGrid 中获取单元格值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在 JQGrid 中获取单元格值?

How to get a cell value in JQGrid?

如果我使用以下语法 –

If I use the following syntax –

var ret = jQuery("#MyGrid").jqGrid('getRowData', id);
ret = ret.ProductId;

它返回以下 HTML.

it returns the following HTML.

'input class="editable" name=" ProductId " id="0_ ProductId " style="width: 98%;" type="text"'

我实际上需要单元格的值.

I actually need the value of the cell.

谢谢.开发

推荐答案

如果你只需要一个已经保存的单元格的值,你可以用这个来获取

If you only need the value of a cell that has already been saved, you can get it with this

$('#myTable').jqGrid('getCell',row_id,'column_name');

这篇关于如何在 JQGrid 中获取单元格值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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