单元格中的JqGrid选择框 [英] JqGrid Select Box in a cell

查看:112
本文介绍了单元格中的JqGrid选择框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在一个特定的单元格中找到一个选择框。我的复选框显示很好,但是选择框没有显示。

I am trying to get a select box to be in a particular cell. I have the checkboxes showing up just fine, but the select boxes are not being displayed.


 $('#list5').jqGrid({ 
  datatype: "local", 
  width: "100%",
  height: "100%",
  colNames:['Universe1','Connect String1', 'Report1', 'Object Type1','Path1','Owner1', '|', 'Universe', 'Select','Connect String', 'CheckBox', 'Report', 'Object Type','Path','Owner'], 
  colModel:[ 
   {name:'universe1', index:'universe1', width:70},{name:'connect1',index:'connect1', width:120}, 
        {name:'report1',index:'report1', width:90}, 
        {name:'objType1',index:'objType1', width:50, align:"right"}, 
        {name:'path1',index:'path1', width:50, align:"right"},
        {name:'owner1',index:'owner1', width:100, align:"right"},
        {name:'pipe',index:'pipe', width:10, align:"center"},
        {name:'universe', index:'universe', width:70}, 
        {name:'ship',index:'ship', width:90, editable: true, edittype:"select", formatoptions: {disabled : false}, editoptions:{value:"FE:FedEx;IN:InTime;TN:TNT;AR:ARAMEX"}},
        {name:'connect',index:'connect', width:120}, 
        { name: 'airPost', width: 40, index: 'airPost', formatter: 'checkbox', align: 'center', //Checkbox
                      editoptions: { value: "1:0" }, stype: 'select', editable:true, searchoptions: { value: "1:Yes;0:No" }, formatoptions: {disabled : false} },
        {name:'report',index:'report', width:90}, 
        {name:'objType',index:'objType', width:50, align:"right"}, 
        {name:'path',index:'path', width:50, align:"right"},
        {name:'owner',index:'owner', width:100, align:"right"}

       ], 

     caption: "Grid",
     autowidth: true,
     viewrecords: true,
     footerrow: true,
     userDataOnFooter: true,
     data: mydata
     }); 


推荐答案

可能是误会。只有在单元格处于编辑模式时,才会在单元格中看到选择框。例如,您可以在您的本地jqGrid中包含单元格编辑支持,如果您在网格定义中包含两个附加参数

Probably it is misunderstanding. You will see select box in cell only if the cell will be editing mode. For example you can include cell editing support in your local jqGrid if you include two additional parameters in the grid definition

cellEdit: true,
cellsubmit: 'clientArray'

您还可以使用内联编辑

我不知道你的数据在 mydata 数组看起来像。可能需要,您必须添加 formatter:'select'另外还有'ship'列的定义。

I am not sure how your data in mydata array look like. It can be needed, that you have to add formatter:'select' additionally to the definition of the 'ship' column.

这篇关于单元格中的JqGrid选择框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆