Monday, March 26, 2012

Design question - UpdatePanel wrapping a GridView

As a general UI design question, I was wondering if it even makes sense (gives any improvement in the user experience, that is) to wrap a GridView in an UpdatePanel, considering that the page's sole purpose is to search for X and the grid displays the search results. There is not much that the user can do with in the page, basically search, view the results, sort them and go to next/previous page of search results.

Is it really worth it? What would be the pros/cons?

Well, I tend to avoid update panels in any case, but assuming you prefer that as your ajax delivery mechanism, I'd say that it still makes sense. Very few pages are completely devoid of anything but a data view; most have (at least) navigation to other pages and some form of branding. Most pages have quite a bit more in terms of markup, including images and other style elements. In short, yeah, there's still some payoff. I'd argue, actually, that a page with just one server-side control is actually a better cantidate for an updatepanel, b/c more server controls = bigger viewstate = less value from your update panel b/c of weight on the wire.


i'm all for wrapping the gridview in an updatepanel. I'm currently writing an app that is 100% postback-less and wrapped in update panels, and with my gridviews i am able to filter, sort, and page the results without a flicker. also, if done correctly, the amount of data transferred over the wire will be less than with a full postback, however, you will not save any memory space on the server, you may even use a little more but not a big deal.


Try the Asp.net Ajax Grid.http://dotnetslackers.com/articles/ajax/ASPNETAjaxGridAndPager.aspx

No comments:

Post a Comment