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

ApplyState() doesn't seem to apply DockZoneID

1 Answer 86 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Tom Gioconda
Top achievements
Rank 1
Tom Gioconda asked on 12 Jun 2008, 10:53 PM
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.

1 Answer, 1 is accepted

Sort by
0
Tom Gioconda
Top achievements
Rank 1
answered on 16 Jun 2008, 11:42 PM
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.
Tags
Dock
Asked by
Tom Gioconda
Top achievements
Rank 1
Answers by
Tom Gioconda
Top achievements
Rank 1
Share this question
or