Page 1 of 1

how to detect empty grid (if no data from REST)

Posted: Wed Sep 19, 2012 9:51 pm
by Eric5020946

I wonder how to detect empty grid if no data was loaded from REST service.
I've tried this but grid works in different way, it doesn't work...
All I need to do is detect no dat aloaded from REST service via JSON and show message

if( Tiggr("grid_name").is(':visible') )
{
// do some extra operation
}
else
{
Tiggr("label_header").text("There are currently no items to show");
}


how to detect empty grid (if no data from REST)

Posted: Wed Sep 19, 2012 10:11 pm
by maxkatz

You check if any data was returned in service's 'success' event. You get passed 'data' argument -- that's the data returned from the server.


how to detect empty grid (if no data from REST)

Posted: Wed Sep 19, 2012 10:11 pm
by maxkatz

You check if any data was returned in service's 'success' event. You get passed 'data' argument -- that's the data returned from the server.