jQWidgets Forums

jQuery UI Widgets Forums Grid Nested grid to expand to the height of all the data

This topic contains 1 reply, has 2 voices, and was last updated by  ivailo 9 years, 1 month ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • goldie
    Participant

    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


    ivailo
    Participant

    Hi goldie,

    Unfortunately, dynamic row details height is not supported.

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.