Truly, the event handler for the OnDockPositionChanged
event is attached too late in the page lifecycle. If you want to create RadDock controls dynamically, which includes attaching the event handlers, you should do it in the Init
event of the page, in order to allow the RadDockLayout to automatically manage their positions.
You can check this help article,
concerning the dynamic creation of a RadDock and where in the page lifecycle should the control be added.
So in order to correctly define the event handler programmatically, you should specify it on Page.Init as shown on the example below:
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward!
We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>