json - How to get the Grid Size in JQuery -


i had div id ("mydivid"), in i'm able json result it. problem - when json result size zero, want show message - "result size zero" . if size greater than zero. usual display content in it.

$("#mydivid").setgridparam({datatype:'json', page:1,url : url}).trigger('reloadgrid'); 

i got answer.

it can done using isemptyobject method, passing response input argument.

if(jquery.isemptyobject(response)) {                 jquery("#gbox_"+divid).hide();                 jquery("#no_record_found").html("result size zero");                 $("#test").removeattr("disabled");                  if(callback!= null)                     callback();              } 

Comments

Popular posts from this blog

jQuery Mobile app not scrolling in Firefox -

c++ - How to add Crypto++ library to Qt project -

php array slice every 2th rule -