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

阿_-_东 2014-01-05 08:09:02
如何用jqgrid使单元格既可以编辑又可以下拉。编辑时可以动态搜索下拉的的内容显示。求高人指点。项目很紧。。。压力山大。。。大过年的搞的人心事重重,求救。。。
...全文
110 4 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
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... }
tony4geek 2014-01-05
  • 打赏
  • 举报
回复
重写他的方法。。绑定

81,122

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧