相关疑难解决方法(0)

jqGrid - 如何根据*initial*列值设置自定义editoptions?

我使用EF4和ASP.NET Web窗体的开源jqGrid插件.我需要根据DB中的列值在可内联编辑的网格行中设置输入元素.例如,第一行可以包含DDL,第二行可以包含复选框等.

我正在尝试使用custom_element和实现这一点custom_values,如下所示:

$("#grid1").jqGrid({
    url: 'Default.aspx/getGridData',
    datatype: 'json',
    ...
    colModel: [
    ...
    //contains the input type ('select', etc.)
    { name: 'InputType', hidden:true }, 
    ...
    //may contain a string of select options ('<option>Option1</option>'...)
    { 
      name: 'Input', 
      editable:true, 
      edittype:'custom', 
      editoptions:{
         custom_element: /* want cell value from InputType column here */ , 
         custom_value:   /* want cell value from Input column here */ 
      } 
     }, 
    ...
    ]
});
Run Code Online (Sandbox Code Playgroud)

该jqGrid的文档说,我可以调用自定义函数来设置custom_elementcustom_values,但我不知道怎样才能捕捉的列值,并将其传递到我的自定义功能.

为了设置custom_values,我确实注意到Oleg使用该 …

c# asp.net jquery-plugins jqgrid

6
推荐指数
1
解决办法
1万
查看次数

标签 统计

asp.net ×1

c# ×1

jqgrid ×1

jquery-plugins ×1