jqGrid, how to populate select list from query

2019-02-09 20:43发布

I got a basic jqGrid working in my coldfusion project. One of my fields in jqGrid is a combo box. Currently the editoption values are hard coded just like below.

colModel :
[
  {
   name:'seqnum',index:'seqnum', width:100,resizable:true,   
   align:"left",sorttype:"text",editable:true,edittype:"select",editoptions:   
   { value:"1:one;2:two"},editrules:{required:true}
  }
]

I am trying to figure out a way to populate the drop-down from a query/url.

Any help would be greatly appreciated.

Thanks in advance

标签: jqgrid
7条回答
Rolldiameter
2楼-- · 2019-02-09 21:23

Use dataUrl... (see the wiki here).

Currently dataUrl generates a GET but if one pulls the code from Github the GET can be changes to a POST with no apparent side effects.

查看更多
登录 后发表回答