I'm creating the jqGrid with a simple Subgrid. I have set the property
autowidth:true
so that the jqGrid expands to the width of the parent element. When I expand the row the Subgrid doesn't expand to the width of the jqGrid. The width of the Subgrid remains the sum of all Subgrid columns. Is this an expected behavior or a bug?
Do I need to use jQuery to manually set the width of the Subgrid or is there an another way?
This is an example of the code that I use:
jQuery("#list").jqGrid({
url:'some-url.php',
mtype: "POST",
datatype: "json",
colNames:['Inv No','Date','Total'],
colModel:[
{name:'id',index:'id', width:55},
{name:'amount',index:'amount', width:55},
{name:'tax',index:'tax', width:55}
],
multiselect: false,
autowidth: true,
rowNum:10,
rowList:[10,20,30],
pager: '#pager',
sortname: 'id',
sortorder: "desc",
viewrecords: true,
subGrid : true,
subGridUrl: 'some-other-url.php',
subGridModel: [ {name:['CustomerId','CustomerName'], width:[55,55,]} ],
caption: "Subgrid Example",
sortable: true
});
jQuery("#list").jqGrid('navGrid','#pager',{add:false,edit:false,del:false});