Javascript and Stepping Through All RadDocks

4 posts, 0 answers
  1. Constantine
    Constantine avatar
    6 posts
    Member since:
    Jan 2009

    Posted 20 May 2011 Link to this post

    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

  2. Gimmik
    Gimmik avatar
    170 posts
    Member since:
    May 2011

    Posted 20 May 2011 Link to this post

    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;
       }
     }
    }
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Constantine
    Constantine avatar
    6 posts
    Member since:
    Jan 2009

    Posted 20 May 2011 Link to this post

    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...

  5. Gimmik
    Gimmik avatar
    170 posts
    Member since:
    May 2011

    Posted 20 May 2011 Link to this post

    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
Back to Top