I have an aspx page with RadTab (5 tabs) and RadMultiPage.
Each tab has a RadGrid which only binds (declaritively with DataSourceId) if its MultiPage is loaded. If the user never clicks on tab 4 then the RadGrid4 never databinds.
That is good because it allows me to on_demand/lazy load the child collections on the business object that is driving the screen. The user only has to wait for the data they are interested in. If they only visit Tab1 then only MainObject.ChildCollection1 lazy loads. Nice and clean.
Business object is like this:
- ChildCollection1 (lazy load) - corresponds to Grid1
- ChildCollection2 (lazy load) - corresponds to Grid2
PROBLEM: If user loads page and visits Tab1 and performs some db update on Grid1...then I have to reload MainObject after save. Currently then I call Rebind() on all 5 grids. This is expensive and the user may not have ever visited the other tabs. Is there a way I can:
1. Detect which grids have databound and only call Rebind() on those?
2. Even better would be if I could "reset" the grid somehow so it doesn't think it has databound yet?
If there is a way to do #2 then I could only call Rebind() on the RadGrid that .Visible = True.
Something like this:
1. User performs some update that cause MainObject to reload from DB.
2. Detect which grid is currently visible and call Rebind on it
3. Reset all other grids so they think they have not databound yet
4. If user clicks on another tab after this...the corresponding RadGrid calls SelectObject on DataSource like normal
All updates are happening from RadAjaxPanel which contains tabs/multi-page/and grids
Thank you for your help.