GridView (ASP 2.0 DataGrid) Question

bri189a

Senior Contributor
Joined
Sep 11, 2003
Messages
1,004
Location
VA
I was reading an article last night in ASP.NET Pro Magizine and there was an article on the 'callback' (JavaScript RPC/Atlas - whatever buzz word you want to tie to it) feature they have built into the TreeView and GridView controls. Okay I think it's really cool they built this into the GridView for paging and sorting - lots of saved bandwidth; higher usability.

My question for someone who has done more research: After changing pages, or resorting - how does it handle post backs? Say one of your columns is a template column that has a drop down list in it that auto post backs (say you're changing a category of an item) - well now that you've changed pages/sorted, etc... your ViewState isn't going to match what's actually being displayed...your ViewState is going to think that your still on the original page and sort order that you downloaded the page with. The only way around this would be for the RPC not only to change the html on the clients page, but also change the ViewState on the client page or put some sort of special values somewhere that ASP worker process will pick up on when the page initializes. I don't see how they could 'easily' update the ViewState...much less make the functionallity extendable for us to make our own control that will do async callbacks like that; however I know those folks in Redmond are pretty slick.

So does anyone know how someone will 'code' for these type of events? Or better how Microsoft deals with the ViewState no longer matching what is actually displayed because of async callbacks?
 
Back
Top