首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

哪位高手用过Jqgrid表格插件帮忙看看

2014-01-22 
谁用过Jqgrid表格插件帮忙看看如何用jqgrid使单元格既可以编辑又可以下拉。编辑时可以动态搜索下拉的的内容

谁用过Jqgrid表格插件帮忙看看
哪位高手用过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> 
...
</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... }

热点排行