JqGrid在单元格中选择框
我试图让一个选择框在特定的单元格中。 我有复选框显示正常,但没有显示选择框。
$( '#list5')。jqGrid的({ 数据类型:“local”, 宽度:“100%”, 身高:“100%”, colNames:['Universe1','Connect String1','Report1','Object Type1','Path1','Owner1','|','Universe','Select','Connect String','CheckBox', '报告','对象类型','路径','所有者'], 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”} ] 标题:“网格”, autowidth:true, viewrecords:是的, footerrow:是的, userDataOnFooter:true, 数据:mydata });
可能是误会。 仅当单元格将处于编辑模式时,您才会在单元格中看到选择框。 例如,如果在网格定义中包含两个附加参数,则可以在本地jqGrid中包含单元格编辑支持
cellEdit: true, cellsubmit: 'clientArray'
您也可以使用内联编辑 。
我不确定你的mydata
数组中的数据是什么样的。 可能需要添加格式化程序:’select’除了’ship’列的定义之外。
谢谢我让它工作这是一个没有cellEdit,cellsubmit:和editurl的问题:添加到网格