ParamQuery grid support forum
General Category => ParamQuery Pro Evaluation Support => Topic started by: aniket.kulkarni on June 06, 2014, 04:43:29 pm
-
Hi!
I want to know how do I check if grid is empty or not before accessing the row from the grid?
//here if grid is empty then creates problem
var rowData2 = $gridMain.pqGrid( "getRowData", {rowIndx: 0} );
-
Please check this post:
http://paramquery.com/forum/index.php?topic=606.msg3542#msg3542
-
Thanks first one worked.
var totalRecords = $grid.pqGrid('option', 'dataModel.data' ).length;
Second is having problem if grid has data then totalRecords are null but for empty it is 0 (zero).