在jqGrid中停止可调整大小的列如何使jqGrid的所有列都不可调整大小?目前,我认为每一列都必须指定属性{regzable:false}。我可以为整个网格指定吗?
2 回答
尚方宝剑之说
TA贡献1788条经验 获得超4个赞
cmTemplate:{resizable:false}
colModel
align:'center'
cmTemplate
colModel
cmTemplate
colModel
var myDateTemplate = {sorttype:'date', formatter:'date', formatoptions: {newformat:'m/d/Y'}, datefmt: 'm/d/Y', align:'center', width:80 } $("list").jqGrid({ colModel: [ ... {name:'column1': template:myDateTemplate}, {name:'column2': template:myDateTemplate, width:90}, ... ] ... });
myDateTemplate
江户川乱折腾
TA贡献1851条经验 获得超5个赞
{ name: 'quantity_warehouse', index: 'quantity_warehouse', template: intColTemplate, width: '70' }, { name: 'status', index: 'status', align: 'left', template: stringColTemplate, width: '90' }, { name: 'snapshot_at', index: 'snapshot_at', template: dateColTemplate }, { name: 'applied_at', index: 'applied_at', template: dateColTemplate },
var dateColTemplate = { align: 'left', search: true, stype: 'text', width: '70', datefmt: 'm/d/y', formatter: 'date', formatoptions: { srcformat: 'm/d/y', newformat: 'm/d/Y' }, sorttype: 'date', searchrules: { required: true, date: true }, searchoptions: { sopt: ['eq', 'ge', 'le'], dataInit: function (el) { $(el).datepicker({ changeYear: true, changeMonth: true, showButtonPanel: true }); } } }; var intColTemplate = { align: 'left', search: true, stype: 'text', searchoptions: { sopt: ['eq', 'ge', 'le']} }; var stringColTemplate = { align: 'left', search: true, stype: 'text', searchoptions: { sopt: ['bw', 'cn']} };
- 2 回答
- 0 关注
- 756 浏览
添加回答
举报
0/150
提交
取消