Reputation: 77
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.
Upvotes: 5
Views: 4870
Reputation: 221997
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});
Upvotes: 6