【问题标题】:Query select field on JqGrid edit form查询 JqGrid 编辑表单上的选择字段
【发布时间】:2012-03-29 02:21:53
【问题描述】:

我在 JqGrid 上有这个专栏模型:

{name:'ta',index:'ta',jsonmap:'ta',width:70,editable:true,edittype:'select',
editoptions: {dataUrl:hostname+'/sisfa/ta_cb'}}

我正在使用 JqGrid 表单编辑来编辑此字段。如何在表单编辑时“捕捉”该字段的字段编辑器。我正在使用这种方法,但不起作用

.editGridRow("new", 
        {closeAfterAdd: true, addCaption:'Add Data',
        width:500,dataheight:300,beforeShowForm:function(formid){
            console.log($('#tr_ta').find('select[name=ta]'));
        }});        

此方法适用于其他编辑类型。

【问题讨论】:

    标签: jquery jquery-plugins jqgrid


    【解决方案1】:

    您可以将代码从beforeShowForm 移动到dataIniteditoptions。在这种情况下,您将确定代码将在 之后执行,<select> 将被创建并填充从服务器接收到的数据。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-07-06
      • 1970-01-01
      • 2011-03-25
      • 1970-01-01
      • 2011-06-26
      • 1970-01-01
      • 2012-03-03
      • 1970-01-01
      相关资源
      最近更新 更多