ParamQuery Grid
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Help
Search
Login
Register
ParamQuery grid support forum
»
General Category
»
ParamQuery Pro Evaluation Support
»
How to check grid has no rows?
« previous
next »
Print
Pages: [
1
]
Author
Topic: How to check grid has no rows? (Read 5721 times)
aniket.kulkarni
Newbie
Posts: 22
How to check grid has no rows?
«
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} );
Logged
paramvir
Administrator
Hero Member
Posts: 6310
Re: How to check grid has no rows?
«
Reply #1 on:
June 06, 2014, 05:57:58 pm »
Please check this post:
http://paramquery.com/forum/index.php?topic=606.msg3542#msg3542
Logged
aniket.kulkarni
Newbie
Posts: 22
Re: How to check grid has no rows?
«
Reply #2 on:
June 10, 2014, 06:40:04 pm »
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).
Logged
Print
Pages: [
1
]
« previous
next »
ParamQuery grid support forum
»
General Category
»
ParamQuery Pro Evaluation Support
»
How to check grid has no rows?