This is a migrated thread and some comments may be shown as answers.

Implementing a portal with tabbed pages of widgets

5 Answers 136 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 24 Dec 2007, 06:58 PM
Hello,

I am having an issue where I am implementing a portal with many pages, like Google IG. I am able to successfully create and select tabs such that the async trigger will refresh widget data. So, if I load the page, it populates all the Docks for the currently selected tab correctly. If I select a different tab, and then hit refresh, it will populate all of those tabs correctly.

Now, what I'm trying to accomplish is that when I select the new tab, after it loads the data it needs to trigger the RadDockLayout to repopulate for the new data retrieved on the server. Since my OnInit command adds all docks to the RadDockLayout each and every time from the updated datasource, I shouldn't need to do anything for this to work, other than cause an even similar to that of DockPositionChanged. That's not the case, though, since OnInit will fire *before* the update to change the tab page (it's on an UpdatePanel), populating with all the original controls, and then go and change the datasource from the tab select event. So I need a way of forcing this after the fact.

Unfortunately, I can't find a way to raise this command to repopulate the DockLayout since the tabs need to be in an UpdatePanel, I know the datasource is changed but the DockLayout doesn't. One way this is proven is that if I select a new tab, and then drag the previous tab's widget to a new place (it didn't get removed because no event was raised), then the whole page posts back and the correct docks are now displayed.

So I'm wondering how to entice the RadDockLayout to cause an event similar to DockPositionChanged to call OnInit and repopulate nicely?

5 Answers, 1 is accepted

Sort by
0
Petya
Telerik team
answered on 02 Jan 2008, 03:45 PM
Hi Daniel,

Due to the specifics of the control currently in dynamic objects scenarios RadDocks need to be re/created in OnInit. Therefore the only thing you can do is force some kind of refresh/redirect to the same page in the tab click handler.

All the best,
Petya
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Daniel
Top achievements
Rank 1
answered on 02 Jan 2008, 05:21 PM
Are you saying that dynamically changing out RadDock objects from a RadDockLayout isn't possible in an AJAX scenario? I know that the OnInit is raised after each async postback, so I should be able to trigger an async refresh in the tab click handler, such as updating another UpdatePanel that is set to Conditional/NoChildTriggers.

Is there an example out there of a RadDockLayout in an UpdatePanel where different RadDocks are docked to a RadDockZone on a button click that triggers a partial postback?
0
Daniel
Top achievements
Rank 1
answered on 03 Jan 2008, 01:39 AM
I was able to solve this issue after my last reply's brainstorm. Basically, I wrap the whole RadDockLayout in another UpdatePanel that is configured to only update when called in the codebehind.

Then, in my tab's selected event, I first remove all the RadDocks by iterating through the RadDockLayout.RegisteredZones and calling .Clear() on each zone, I then make the call to retrieve the newly selected tab's RadDock states so they are ready for a refresh. Then I explicitly call the .Update() method on my new UpdatePanel wrapper which will raise OnInit during the partial refresh / full postback and repopulate the zone with the docks for that tab.

Phew!
0
Petya
Telerik team
answered on 03 Jan 2008, 12:28 PM
Hello Daniel,

From your last post I am left with the impression that you have managed to solve your problem. In case I am mistaken, please contact us again.

Best wishes,
Petya
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Conor Seabrook
Top achievements
Rank 1
answered on 21 Jan 2008, 07:53 PM
Hi Daniel,

I am attempting to achieve something very similar. I've only just begun investigate using the rad. dock and was wondering if you had some examples of getting this to work. I'm looking for something very similar to google/ig

Cheers,
Conor
Tags
Dock
Asked by
Daniel
Top achievements
Rank 1
Answers by
Petya
Telerik team
Daniel
Top achievements
Rank 1
Conor Seabrook
Top achievements
Rank 1
Share this question
or