Well, I got up earlier than I wanted to today, but I'm feeling good!!
What was happening:
During the Page Init processing, I load my portal page, applying the dock zone and index to each of the docks and their states. By the time the page was rendered, only the value for the index was being overwritten.
What I did:
I used the LoadDockLayout event to apply the dock states' zone and index to the DockLayoutEventArgs as documented in
Dynamically Created Docks. This wasn't working, so I added some diagnostic outputs during the event and saw that the docks and their states had their index values altered. Apparently, they were being overwritten according to the order they had been created.
Rather than going back to the database to fetch the dock states again, I decided simply to create an array of independent dock states that I created as I created the docks. My goal was to have a collection of dock states that I knew could not be altered elsewhere. Then, during the LoadDockLayout, instead of using the docks or their states, I used my personal collection of states to apply to the DockLayoutEventArgs. This is working!
The upshot of this is that the documentation online (
Dynamically Created Docks) works, but it still doesn't appear it should be needed. All other dock state information is preserved. It's just the index that is lost/overwritten.
I'm hoping that when this is addressed I can simply remove the event handler and also that leaving it in won't cause other problems at that time. Any advanced insight into how this will play out would be appreciated.
Regardless, I get to be the hero at my client site today!
Thanks.