谁用过Jqgrid表格插件帮忙看看

阿_-_东 2014-01-05 08:09:02
如何用jqgrid使单元格既可以编辑又可以下拉。编辑时可以动态搜索下拉的的内容显示。求高人指点。项目很紧。。。压力山大。。。大过年的搞的人心事重重,求救。。。
...全文
47 点赞 收藏 4
写回复
4 条回复
阿_-_东 2014年01月05日
引用 2 楼 myfmyfmyfmyf 的回复:
这是官网的文档,按照下面的改改 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... }
谢谢,这些资料在网上看了很多,还是达不到要求,要求能编辑单元格,还是下拉,编辑的时候根据内容过滤下拉的内容。
回复 点赞
阿_-_东 2014年01月05日
引用 1 楼 rui888 的回复:
重写他的方法。。绑定
本人一直在搞swing,你说的太大了,不懂
回复 点赞
牟云飞 2014年01月05日
这是官网的文档,按照下面的改改 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... }
回复 点赞
兔子托尼啊 2014年01月05日
重写他的方法。。绑定
回复 点赞
发动态
发帖子
Web 开发
创建于2007-09-28

5.2w+

社区成员

34.1w+

社区内容

Java Web 开发
社区公告
暂无公告