2

I have a JQGrid with an input field, which works fine, but I would like to have the field always shown, now the user has to click in the field to see the input text field appear.

      colModel:[ {name:'Image', index:'Image', width:10, formatter: imageFormatter, align: 'center', sortable:false},                     
                 {name:'ItemId', index:'ItemId', width:15, align: 'center'}, 
                 {name:'ItemName', index:'ItemName'},                     
                 {name:'UnitId', index:'UnitId', width:10, align: 'center'},
                 {name:'MultipleQty', index:'MultipleQty', width:10, align: 'right'},
                 {name:'Quantity', index: 'Quantity', align:'center',editable:true,editrules:{number:true}, edittype:'text', width:14,editoptions:{size:5,maxlength:5}},
                 {name:'Basket', index:'Basket', width:7, formatter: basketFormatter, align: 'center', sortable:false}                  
               ],      

It's the quantity field, which option can I use to have the field always shown ? Where can I find the documentation surrounding all possible options ?

4

1 回答 1

1

经过长时间的搜索,我终于找到了解决方案:

jqGrid:默认情况下所有行处于“内联编辑模式”

我添加了这个:

loadComplete: function () {
    var $this = $(this), ids = $this.jqGrid('getDataIDs'), i, l = ids.length;
    for (i = 0; i < l; i++) {
        $this.jqGrid('editRow', ids[i], true);
    }
}
于 2013-03-27T12:17:43.243 回答