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

Javascript and Stepping Through All RadDocks

3 Answers 63 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Constantine
Top achievements
Rank 1
Constantine asked on 20 May 2011, 02:47 PM

I have implemented a portal page that allows users to position docks in three zones or float additional docks around the interface.   This allows users with different screen resolutions to make use of their full screen and not be bound to our web portals sizing when having multiple docks on the screen.

To facilitate this I have written a script to ensure that users cannot move floating docks outside of the current screen bounds.  However, the problem I am running into is losing docks when the browser window is resized.   Tapping into a resize event handler for the browser is easy enough but I can’t find a command to cycle through all the open (or just floating) RadDocks to get their current positions so I can reposition them based on the screen resize.

Is there a command similar to cycling through a DockState in C for Java on the client side???

TIA

3 Answers, 1 is accepted

Sort by
0
Gimmik
Top achievements
Rank 1
answered on 20 May 2011, 06:20 PM
Hi Constantine,
Are you looking for something like this? There is lots of good info on this page:
http://www.telerik.com/help/aspnet-ajax/dock-control-creation.html

Hope that helps,
-Gimmik

private List<DockState> CurrentDockStates
{
 //Store the info about the added docks in the session.
 private List<DockState> CurrentDockStates
 {
   get
   {
     List<DockState> _currentDockStates = (List<DockState>)Session["CurrentDockStates"];
     if (Object.Equals(_currentDockStates, null))
     {
       _currentDockStates = new List<DockState>();
       Session["CurrentDockStates"] = _currentDockStates;
     }
     return _currentDockStates;
   }
   set
   {
     Session["CurrentDockStates"] = value;
   }
 }
}
0
Constantine
Top achievements
Rank 1
answered on 20 May 2011, 08:17 PM
Hi Gimmik,

That is the logic I am looking to recreate on the client-side (Java) instead of the server-side (C#) which is shown in your code snippit.

Thanks...

0
Gimmik
Top achievements
Rank 1
answered on 20 May 2011, 10:03 PM
Hi Constantine,

I don't know how to accomplish that on the client-side. Perhaps you can wire-up the client side "OnClientInitialize" event to dynamically build out a global array in javascript? If you can wire-in the browser resize event to iterate over the array then maybe you can reposition the windows. It sounds like you already have most of this logic in other forms, so hopefully you can get this to work.

Keep me updated, I would love to learn how you accomplish your goal.
-Gimmik
Tags
Dock
Asked by
Constantine
Top achievements
Rank 1
Answers by
Gimmik
Top achievements
Rank 1
Constantine
Top achievements
Rank 1
Share this question
or