Lock position of RadDock

4 posts, 0 answers
  1. Jimmie Houts
    Jimmie Houts avatar
    7 posts
    Member since:
    Mar 2007

    Posted 11 Jul 2007 Link to this post

    Hi,

    I'm building a portal site for use by users with multiple access levels. Higher-level users are able to create docks that are then shared with lower-level users. Lower-level users may not edit or move these "fixed" docks. However, since lower-level users can create their own docks, they can effectively move those "fixed" docks down on the page by dragging their new docks above the "fixed" docks.

    We would like to avoid having these "fixed" docks moved at all, but we don't want to make the whole zone forbidden to the lower-level user. Is there any easy way to do this?

    Thanks.
  2. Ubong
    Admin
    Ubong avatar
    328 posts

    Posted 12 Jul 2007 Link to this post


    Hello Jimmie ,

    You need to set the EnableDrag property to false for the "fixed " dock objects which your Higher-level users create. This will disallow dragging of the object outside the zone but still leave the zone accessible. In the example below, the first dock object in the first dock zone is undraggable ("fixed") and the second dock object in the second Zone can be dragged into the first zone:

    <telerik:RadDockZone ID="yubzone" runat="server">  
       <telerik:raddock runat="server" id="RadDock1" enabledrag="false"     
           title="undraggable">      
           
       </telerik:raddock> 
    </telerik:RadDockZone> 
     
    <telerik:raddockzone id="RadDockzone2"  runat="server">  
        <telerik:raddock id="RadDock2" runat="server"   title="draggable">  
          
    </telerik:raddock> 



    Kind Regards,
    Ubong
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Jimmie Houts
    Jimmie Houts avatar
    7 posts
    Member since:
    Mar 2007

    Posted 12 Jul 2007 Link to this post

    Hi Ubong,

    I am setting the fixed docks to EnableDrag="false". Those docks can't be dragged; that part works great.

    However, I can indirectly move those docks by dragging another dock above the fixed dock. The draggable dock takes the place of the non-draggable dock, so it gets moved anyway.

    Is there any way to stop the dock from moving altogether?

    Thanks!
  4. Petio Petkov
    Admin
    Petio Petkov avatar
    825 posts

    Posted 13 Jul 2007 Link to this post


    Hi Jimmie,

    You can create two RadDockZones(RadDockZone1 and RadDockZone2) where RadDockZone2 is right after RadDockZone1. Using this approach, these two zones "look like one".
    RadDocks created  from the "Higher-level users" will be with EnableDrag="false" and will be placed in RadDockZone1.
    All other RadDocks (created from " Lower-level users ")  will be with ForbiddenZones="RadDockZone1" and  initially will be placed in other zones different from RadDockZone1. On this way they cannot be docked to RadDockZone1. 
     The following code illustrates my words:

     <telerik:RadDockLayout ID="RadDockLayout1" runat="server">  
                        <table> 
                            <tr> 
                                <td> 
                                    <telerik:RadDockZone ID="RadDockZone1" runat="server" Width="300px" MinHeight="100px">  
                                        <telerik:RadDock ID="RadDock1" runat="server" Title="RadDock1" EnableDrag="false" /> 
                                        <telerik:RadDock ID="RadDock2" runat="server" Title="RadDock2" EnableDrag="false" /> 
                                        <telerik:RadDock ID="RadDock3" runat="server" Title="RadDock3" EnableDrag="false" /> 
                                    </telerik:RadDockZone> 
                                     <telerik:RadDockZone ID="RadDockZone2" runat="server" Width="300px" MinHeight="300px">  
                                        <telerik:RadDock ID="RadDock4" runat="server" Title="RadDock4" ForbiddenZones="RadDockZone1" /> 
                                        <telerik:RadDock ID="RadDock5" runat="server" Title="RadDock5" ForbiddenZones="RadDockZone1" /> 
                                        <telerik:RadDock ID="RadDock6" runat="server" Title="RadDock6" ForbiddenZones="RadDockZone1" /> 
                                    </telerik:RadDockZone> 
                                </td>                             
                                <td> 
                                    <telerik:RadDockZone ID="RadDockZone3" runat="server" Width="300px" MinHeight="400px">  
                                        <telerik:RadDock ID="RadDock7" runat="server" Title="RadDock7" ForbiddenZones="RadDockZone1" /> 
                                        <telerik:RadDock ID="RadDock8" runat="server" Title="RadDock8" ForbiddenZones="RadDockZone1" /> 
                                        <telerik:RadDock ID="RadDock9" runat="server" Title="RadDock9" ForbiddenZones="RadDockZone1" /> 
                                    </telerik:RadDockZone> 
                                </td> 
                            </tr> 
                        </table> 
                    </telerik:RadDockLayout> 

    I hope that it will helps you achieve your goals!

    Best Regards,
    Petio Petkov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top