获取datagrid中编辑列combobox的value值与text值

var ed = $('#dg').datagrid('getEditor', {index:editIndex,field:'productid'});
var productname = $(ed.target).combobox('getText');
var value = $(ed.target).combobox('getValue');
getEditor options 获取指定编辑器,options包含2个属性:
index:行索引。
field:字段名称。

代码示例:

// 获取日期输入框编辑器并更改它的值
var ed = $('#dg').datagrid('getEditor', {index:1,field:'birthday'});
$(ed.target).datebox('setValue', '5/4/2012');
原文地址:https://www.cnblogs.com/exmyth/p/4122971.html