Adding zones and docks purely through client-side script?

4 posts, 0 answers
  1. mike
    mike avatar
    3 posts
    Member since:
    Apr 2008

    Posted 08 Apr 2008 Link to this post

    Hi all.  I've been looking through the Dynamic Docks example and was wondering whether there were a way to add docks and zones exclusively through client-side script?

    What I'm ultimately trying to do (and trying to decide if we can leverage the RadDock and zone controls for this) is to have a series of docks on the screen in a single zone, with each dock acting as a container for a zone and other docks... in this case, the container docks are Categories and the child docks are Items within those categories.  The items should be sortable within a category, and draggable to other categories.  The categories themselves should be sortable as well.

    I have a simple example with some pre-defined category and item docks working as a proof-of-concept to show that we could have nested docks this way.  But I would then need to allow a user the ability client-side to create new categories and items as well.  Can we mimic a $create(Telerik.Web.UI.RadDoc...) call within a client button's onclick event or otherwise create the new docks/zones from javascript?
  2. Obi-Wan Kenobi
    Obi-Wan Kenobi  avatar
    460 posts
    Member since:
    Aug 2007

    Posted 12 Apr 2008 Link to this post

    RadDock couldn't be created on the client with JavaScript, because it has a Server side rendering.
    The only one way to create the RadDock is with (Postback/Ajax call)

    You can add RadDockZone into a RadDock.
    Also you can use the RadDockZone.dock() method to rearange RaDDocks on the client. You can find more about it here:
    http://www.telerik.com/help/radcontrols/prometheus/?dock_ClientRadDockZone.html
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. mike
    mike avatar
    3 posts
    Member since:
    Apr 2008

    Posted 18 Apr 2008 Link to this post

    Hi Obi-Wan.  I appreciate your reply.  I was able in fact to get a purely client-side creation functionality working.  You are correct in the rendering issue; if the creation is happening through ajax, the server-side control rendering can apply.  In my code I had to render the visual appearance of docks client-side in addition to calling $create(...) for the dock object itself.  I am essentially mimicking the server-side control rendering via the DOM. 

  5. Stephen Austin
    Stephen Austin avatar
    8 posts
    Member since:
    Jan 2009

    Posted 11 Sep 2009 Link to this post

    Can you post any info on how you were able to accomplish this?

    Thanks!
Back to Top