这是官网的文档,按照下面的改改
1. Setting the editoptions value as string The editoptions value must contain a set of value:label pairs with the value separated from the label with a colon (:) and ended with(;). Whichever you use, something like the following
editoptions: { value: “FE:FedEx; IN:InTime; TN:TNT” }
will construct
<select>
<option value='FE'> FedEx </option>
<option value='IN'> InTime </option>
<option value='TN'> TNT </option>
</select>
Note the last element in the string - it should not end with ;
2. Setting the editoptions value as object
In this case the editoptions value must contain an array {} with name:value properties separated by a comma. Below is an example:
...
colModel : [
...
{name:'myname', edittype:'select', editoptions:{value:{1:'One',2:'Two'}} },
...
]
...This will construct an HTML select
<select>
<option value='1'>One</option>
<option value='2'>Two</option>
</select>3. Setting the editoptions dataUrl parameter The editoptions dataUrl parameter is valid only for element of edittype:select. The dataUrl parameter represent the url from where the html select element should be get.
When this option is set, the element will be filled with values from the AJAX request. The data should be a valid HTML select element with the desired options - something like:
<select>
<option value='1'>One</option>
<option value='2'>Two</option>
...
</select>To this element, jqGrid adds the id and name attributes as above.
Multiple selection of options in a select box is also possible. A size attribute may be added as well
...editoptions: {multiple:true, size:3... }