PDA

View Full Version : Way to get record count of returned JSON result set before loading?



dbassett74
29 Jun 2010, 12:58 PM
I want to be able to display a message box if the record count returned from a load request exceeds a certain threshold, and if so, ask the user if they would still like to load the grid, or abort. The problem I'm having is I can't quite figure out how to:

1) Get a record count BEFORE loading
2) Canceling the load

Any help would be appreciated.

Animal
29 Jun 2010, 1:46 PM
What?

Make an Ajax request to a service which does SELECT COUNT(*).... and returns the result. What other things could you imagine?

dbassett74
29 Jun 2010, 4:40 PM
What?

Make an Ajax request to a service which does SELECT COUNT(*).... and returns the result. What other things could you imagine?

I guess that is a potential solution, but I wanted to do it in a single pass, not make multiple calls.