I’m trying to enable and disable custom buttons on a jqgrid, but would enable that button only if the grid is empty and then disable when its not.
Is there a way to test of the grid has data or not?
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can test to see how many records are in the grid. If there are no rows then the grid is empty:
See the documentation for reccount:
Also, since the default value is
0you need to make sure you call this function after data has loaded, such as in theloadCompleteevent.