user1177445
user1177445

Reputation: 1

refresh Gridview in asp.net without page refresh

I have a gridview in asp.net which display a table from sqlserver. when the table in sql server gets updated or new row added,then automatically that should reflect in my gridview without refresh whole page.Dont use update panel. Using Jquery-Ajax i have to refresh gridview alone for every particular duration.(Note : Whole page should not refresh).some one please send me the answer. HOW?

selva

Upvotes: 0

Views: 1529

Answers (1)

The Muffin Man
The Muffin Man

Reputation: 20004

If you want to use jQuery AJAX I suggest that you do not use the GridView. Have your application send back JSON and then construct the grid on the client with JavaScript.

If you use the gridview you will lose all of the functionality it provides by not using the script manager and the update panel.

Although you can make the grid view work with jQuery AJAX it is not practical as you have no control over the markup of the gridview.

To be honest, if you're really worried about performance than I don't suggest you use web forms. Otherwise just use the update panel -- it's still AJAX, except it sends back View State and the values of all the form controls so that you still get full functionality. It's still more efficient than doing a full page post back.

Upvotes: 2

Related Questions