0
我的代码是免费jqGrid:如何将函数返回值赋给edit/addNew表单域?
......
......
{label: 'Reason'
,name: 'reason'
,width: 60
,editable: true
,editrules : { required: true}
,editoptions: { maxlength: 4 }
,formoptions:{rowpos: 5, colpos: 2, label: " <a href='javascript:selectRsnRecord()' " +
" title='See the list of all Reason codes' > Reason</a> " }
},
......
......
当我原因标签上单击编辑/添加新的形式,功能selectRsnRecord()获取的原因值。这个新的原因值应该放在编辑/添加新表单的理性文本框中。我可以得到原因值,但我没有得到如何显示/分配jqGrid编辑/添加新表单文本框的值。以下,我可以看到网格上的新的原因价值。
myGrid.jqGrid('setCell', selectedRowId, 'reason', newValue);
myGrid.jqGrid('getLocalRow', rowid).reason= newValue;
我使用的jqGrid 4.9.0版本,它不可能对我来说,使用任何其他插件。
请让我知道如何在jqGrid编辑/添加新表单文本框本身显示/分配新的原因值。
你总是很棒! –
@GuruN:不客气! – Oleg