ApplyState() doesn't seem to apply DockZoneID

2 posts, 0 answers
  1. Tom Gioconda
    Tom Gioconda avatar
    8 posts
    Member since:
    Feb 2008

    Posted 12 Jun 2008 Link to this post

    I'm having a problem on the latest RadDock.  I have a set of DockStates, and in the Page_Init, I dynamically create the RadDock objects, add them to the RadDockLayout control, and apply their state (I've tried applying their state before adding them to the layout control). 

    The controls appear, but they appear floating, unattached to their zones (they are all supposed to be docked).  Checking in the debugger, I watch as ApplyState fires on each object: every field gets set except DockZoneID and Index.

    Upon checking the examples and docs, I figure it is because I need to attach to the LoadDockLayout event and modify the positions/index there.  So, I try that - attaching the event and using the DockLayoutEventArgs parameter to assign DockZoneIDs and indexes.  No effect.  The debugger shows that there aren't any items to start with in the e.Indicies or e.Positions dictionaries to beging with, and creating the items has no effect.

    Bear in mind that I'm not even trying to save updated states here.  I'm trying to create a few RadDock objects in Page_Init, and apply state to them, forcing them to be docked to a particular zone as dictated by the DockState.

    Any help would be appreciated.
  2. Tom Gioconda
    Tom Gioconda avatar
    8 posts
    Member since:
    Feb 2008

    Posted 16 Jun 2008 Link to this post

    In case anybody is interested - make sure you're using the ClientID when you set your DockZoneIDs and not the server ID. 

    Otherwise, in complex scenarios (master pages, user controls, etc.), the RadDockLayout won't find your zones when it attempts to restore state.
Back to Top