日期:2014-05-17  浏览次数:20761 次

谁用过Jqgrid表格插件帮忙看看
如何用jqgrid使单元格既可以编辑又可以下拉。编辑时可以动态搜索下拉的的内容显示。求高人指点。项目很紧。。。压力山大。。。大过年的搞的人心事重重,求救。。。 

------解决方案--------------------
重写他的方法。。绑定 

------解决方案--------------------
这是官网的文档,按照下面的改改
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&