views:

42

answers:

2

I haven't actually dealt with multiple grids on one page in a very long time, so perhaps someone can jog my memory. I have two grids and a treeview in three separate jQuery UI tabs. Every time I page my gridview, which is a custom control inheriting from Gridview, the other tabs refresh.

How can I stop this?

A: 

You will need to do some sort of AJAX postback when you click on the next page link (or button) and refresh/replace your grid rows.

I would steer clear of wrapping everything in an UpdatePanel (if you choose to take this route) as the ViewState will keep growing and growing... and being passed back and forth.

http://msdn.microsoft.com/en-us/library/system.web.ui.updatepanel.aspx

You want to avoid this (view source -> ViewState) -

alt text

Kris Krause
whats with the screenshot?
citronas
I think that's the viewstate...ouch. LOL
jim
This was previously implemented by someone else, so from the looks of it... there are conditional Update Panels. Funny thing is... I don't see anywhere where they are actually fired to Update. I'm assuming the UI panel is somehow causing them to refresh
jlrolin
Yeah, its the ViewState.
Kris Krause
+1  A: 

Are you refreshing the grids in the postback? When you click paging buttons, page_load will fire. Make sure you're testing for !IsPostBack in this event

James B
No, only one of the small grids refreshes every page, but the page_load within my gridview control fires for all grids when I post back for some reason.
jlrolin
I'm talking about the page_load for the aspx page itself
James B