How to drag and drop a RadDock in a RadDock

8 posts, 1 answers
  1. Joël
    Joël avatar
    5 posts
    Member since:
    May 2009

    Posted 11 May 2009 Link to this post

    Hi,

    can't find an answer on the forum, so I post :).

    There is a demo in flash of what I have to do with RadDock controls :
    http://proto-widgets.airsoftconsulting.info/DEMO_200409_RL_APRR%20v3.html

    The problem is on the end on the demo, when objects from the right column are draged and droped on object on the main column. Both object are RadDock controls.

    Has any one an idea ?

    Thanks !
  2. Obi-Wan Kenobi
    Obi-Wan Kenobi  avatar
    460 posts
    Member since:
    Aug 2007

    Posted 12 May 2009 Link to this post

    You could add a RadDockZone(where you could add another RadDocks) into a RadDock
  3. Joël
    Joël avatar
    5 posts
    Member since:
    May 2009

    Posted 12 May 2009 Link to this post

    Sounds like a good idea :-)

    Thanks. I'll try this.

    I'll tell you if it works
  4. Joël
    Joël avatar
    5 posts
    Member since:
    May 2009

    Posted 12 May 2009 Link to this post

    Hi Obi-Wan. I tried, but it dosen't work.

    1/ I put raddock1 in radzone1
    2/ I put radzone2 in raddock1
    3/ I drag and drop raddock2 in radzone2. Radzone2 is highliting, but raddock2 is docked in radzone1

    Maybe with some more C# or javascript it will work. Any idea ?
  5. Answer
    Obi-Wan Kenobi
    Obi-Wan Kenobi  avatar
    460 posts
    Member since:
    Aug 2007

    Posted 12 May 2009 Link to this post

    Set RadDock2.ForbiddenZones property to RadDockZone1 and everything will be fine.
    A simple example is available here:
    http://demos.telerik.com/aspnet-ajax/dock/examples/forbiddenzones/defaultcs.aspx
  6. Joël
    Joël avatar
    5 posts
    Member since:
    May 2009

    Posted 13 May 2009 Link to this post

    Thank you, it works fine.

    But is there another way than setting RadDock2.ForbiddenZones property to RadDockZone1 ?

    Because users will expect to be able to drag and drop in the two zones.
  7. Obi-Wan Kenobi
    Obi-Wan Kenobi  avatar
    460 posts
    Member since:
    Aug 2007

    Posted 14 May 2009 Link to this post

    -RadDock1 is in RadDockZone1
    -RadDockZone2 is in RadDock1
    If you try to dock RadDock2 in RadDockZone2 it will be docked to RadDockZone1 - this is the reason to set RadDock2.ForbiddenZones to RadDockZone1. 

    My suggestion is to:
      - Use several RadDockZones - one below the other(change their style to look like one RadDockZone).
      - Each main RadDockZone can have only one RadDock - when a RadDock is docked you should invoke a JavaScript method which will set its parent zone as Forbidden for all other RadDocks.

  8. Joël
    Joël avatar
    5 posts
    Member since:
    May 2009

    Posted 14 May 2009 Link to this post

    Hi,

    I think i'll do with your first suggestion.

    The user can drag and drop as much Docks as he wants. So "several" radzones is not enough.

    Thank you for your help :)
Back to Top