Implementing a portal with tabbed pages of widgets

6 posts, 0 answers
  1. Daniel
    Daniel avatar
    44 posts
    Member since:
    Nov 2007

    Posted 24 Dec 2007 Link to this post

    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?
  2. Petya
    Admin
    Petya avatar
    869 posts

    Posted 02 Jan 2008 Link to this post

    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
  3. Daniel
    Daniel avatar
    44 posts
    Member since:
    Nov 2007

    Posted 02 Jan 2008 Link to this post

    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?
  4. Daniel
    Daniel avatar
    44 posts
    Member since:
    Nov 2007

    Posted 02 Jan 2008 Link to this post

    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!
  5. Petya
    Admin
    Petya avatar
    869 posts

    Posted 03 Jan 2008 Link to this post

    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
  6. Conor Seabrook
    Conor Seabrook avatar
    5 posts
    Member since:
    Jun 2005

    Posted 21 Jan 2008 Link to this post

    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
Back to Top