Hello,
Is there a way to get the nested grid to expand to the number of records return without it being pageable or to specify the pagesize.
For example, the first row … if you click on the arrow, it will expand to display 4 records in the nested grid.
However, for the second row, it will expand to accommodate the nested grip to display 40 records.
var dataAdapter = new $jsquery.jqx.dataAdapter(source);
var initrowdetails = function (index, parentElement, gridElement)
{
var row = index;
var id = $jsquery("#jqxgrid").jqxGrid('getrowdata', row)['cID'];
var grid = $jsquery($jsquery(parentElement).children()[0]);
var source =
{
url: 'testNData.php',
datatype: "json",
data: {cid: id},
cache: false,
datafields: [
{ name: 'plugin' },
{ name: 'plugName' },
{ name: 'vDate' },
{ name: 'severity' }
],
root: 'Rows',
beforeprocessing: function (data)
{
source.totalrecords = data[0].TotalRows;
},
sort: function()
{
grid.jqxGrid('updatebounddata', 'sort');
}
};
var adapter = new $jsquery.jqx.dataAdapter(source);
// init Orders Grid
grid.jqxGrid(
{
virtualmode: true,
width: 530,
autoheight: true,
sortable: true,
pageable: true,
pagesize: 6,
source: adapter,
rendergridrows: function (obj)
{
return obj.data;
},
columns: [
{ text: 'Plugin', datafield: 'plugin', width: 200 },
{ text: 'Plugin Name', datafield: 'plugName', width: 200 },
{ text: 'Vulnerability Date', datafield: 'vDate', width: 180 },
{ text: 'Severity', datafield: 'severity', width: 100 }
]
});
}; //end init order
Thanks
Goldie