开发者

dividing jqgrid dialog (form edit dialog) into two layouts

I have jqgrid that has 23 headers. It has edit dialog with a form too.

The problem is from 23 headers, 2 headers are non-editable and the remaining is editable. When I click edit, it will show a long form (with one column) with 21 rows.

Can I change the layout to a 开发者_如何学Cform with two columns and every column has half of my total rows?


In your colModel code you can define a rowpos (to reorder rows) and a colpos (to provide a column) properties. This excerpt is from the jqGrid wiki page on common rules:

<script>
jQuery("#grid_id").jqGrid({
...
   colModel: [ 
      ... 
      {name:'price', ..., formoptions:{elmprefix:'(*)', rowpos:1, colpos:2....}, editable:true },
      ...
   ]
...
});
</script>

So you can define half of your fields as being in colpos : 2. I've tested this solution and it works.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜