Does anyone know how to count the no of rows in asp:GridView using jQuery. If no rows found then I want to do stuff...
Every GridView produces HTML that is basically a table and that table has an ID (view source of your output page to know what im talking about). You can pass the ID either from .Net to JavaScript by means of myGridView.ClientID or in ASP.NET 4 make the ClientIdMode="Static" and thus use the exact same ID you use for the ASP control.
Then in jquery (which is a client-side layer that is completely seperated from the GridView layer), grab that ID and count:
$("#mygridviewid tr").length;