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

RadDock Code-behind Oddities

3 Answers 81 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Cole
Top achievements
Rank 1
Cole asked on 29 Oct 2008, 02:23 PM
Hey all,

Anyone else find it really strange how RadDock's behave when ti comes time for the Post-Back?  I followed the example with savelayout, loadlayout to/from the session but after a day of work-around's had to give up... the code was becoming spahgetti and confusing even to me.

I am wondering how everyone else handles post-back's and dock states?  I am going to modify my button to do an onclick, then record state with javascript and re-create state server-side in my code-behind. 

One serious problem I noticed is that when I start my page, all my RadDocks are in 1 zone to the right, they then are drug onto various zones on left to layout a 'page'.  When you save state, all of the zones still think they are in the zone on the right. 

Anyone have any advice or clear examples of how to use RadDocks?

Thanks,
Rob

3 Answers, 1 is accepted

Sort by
0
Obi-Wan Kenobi
Top achievements
Rank 1
answered on 30 Oct 2008, 09:21 AM
The RadDock control is not a regular control and there is not a straightforward way to use it.
There are two online examples which are very usefull in your case.
1) Dynamically create RadDocks and save their state on postback:
http://demos.telerik.com/ASPNET/Prometheus/Dock/Examples/DynamicDocks/DefaultCS.aspx
2) Dynamically create RadDocks and save their state on each RadDock move
http://demos.telerik.com/ASPNET/Prometheus/Dock/Examples/MyPortal/DefaultCS.aspx

Hope this helps!
0
Cole
Top achievements
Rank 1
answered on 30 Oct 2008, 06:22 PM
Thanks Obi-Wan! 

The good folks at telerik responded... turns out I was not using the command in my RadDock dropped client method "dock.updateClientState();"  This resolved some some issues of collapsed vs. not-collapsed being persisted properly post-postback.  I have already convered my code into manual state-saving via a javascript variable so not sure how it would address my other issues.


0
Obi-Wan Kenobi
Top achievements
Rank 1
answered on 31 Oct 2008, 12:04 PM
You can paste the code in this thread with the FormatCodeBlock tool and I'll try to help you.
My suggestion is to use one of the examples below as your base. You don't need to use alternative logic to save the state.
Tags
Dock
Asked by
Cole
Top achievements
Rank 1
Answers by
Obi-Wan Kenobi
Top achievements
Rank 1
Cole
Top achievements
Rank 1
Share this question
or