Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jqgrid and view record, how to set the width

Tags:

jquery

jqgrid

How can I set the width of the default view from the grid. The default is 300px but I can't find any documentation on how to change it. I could find info on changing the width of the default edit but not the view.

like image 554
cfrunningman Avatar asked Nov 17 '11 17:11

cfrunningman


1 Answers

The place of the documentation is here. You can specify the width in the parameters of viewGridRow method. You call the method directly like here

onSelectRow: function (id) {
    $(this).jqGrid('viewGridRow', id, {width: 500});
}

or you can use "View" icon in the navigator bar:

$("#list").jqGrid('navGrid', '#pager',
    {add: false, edit: false, del: false, search: false, view: true},
    {/*edit options*/}, {/*add options*/}, {/*del options*/}, {/*search options*/},
    {width: 500});
like image 91
Oleg Avatar answered Oct 17 '22 20:10

Oleg