开发者

tableToGrid jqgrid sortable issue

开发者 https://www.devze.com 2023-04-11 23:45 出处:网络
I have awhich has 3 columns and using jqgrid I am converting it to jqgrid table. This piece of line does the trick:

I have a which has 3 columns and using jqgrid I am converting it to jqgrid table. This piece of line does the trick:

tableToGrid("#gasolineProducts", { width: '400', height: 'auto', caption: ''});

However my all column开发者_如何学JAVAs are now sortable. I don't want my 3rd column to be sortable. How can I specify that in here?

Thanks in advance :)


You can use colModel parameter as additional option of the tableToGrid (in the second parameter) in the same way as you would do this if you create jqGrid directly. sortable:false value in the corresponding column will make the corresponding column non-sortable.

One more option would be to define onSortCol event handler which tests the index or iCol parameters to decide which column header is clicked by the user. You can return 'stop' string to deny sorting of the 3rd column.

0

精彩评论

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

关注公众号