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

The IsPinned property

2 Answers 67 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Johnny Andersen
Top achievements
Rank 1
Johnny Andersen asked on 18 Nov 2008, 10:23 AM
Hello mr Telerik

I am using raddocks in the free floating mode (not using dockzones) and would like to have an option to disable the dragmode of the docks (IsPinned = true). However this seems to lock the docks in screen coordinates and not in relation to the document. So when the page is scrolled the docks are stationary in screen coordinates but the rest of the document is scrolled behind. How would you suggest I pin the docks within the document and not in screen space?

Thanks

2 Answers, 1 is accepted

Sort by
0
Accepted
Petko
Telerik team
answered on 19 Nov 2008, 11:00 AM
Hello Johnny,

I prepared a small sample for you, that shows how to achieve the desired behavior.
<body> 
    <script type="text/javascript">  
    function ClientCommand(dock,args)  
    {  
       if(dock.get_enableDrag())  
        {  
            dock.set_enableDrag(false);  
        }  
        else  
        {  
            dock.set_enableDrag(true);  
        }  
    }  
      
    </script> 
    <form id="form1" runat="server">  
       <asp:scriptmanager id="ScriptManager" runat="server" /> 
    <div> 
        <telerik:RadDock ID="RadDock1" runat="server" DockMode="Floating">  
            <Commands> 
                <telerik:DockPinUnpinCommand /> 
                <telerik:DockCommand OnClientCommand="ClientCommand" Name="CustomPin" /> 
            </Commands> 
        </telerik:RadDock> 
    </div> 
    </form> 
</body> 
Hope this helps you.

Sincerely yours,
Petko
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Johnny Andersen
Top achievements
Rank 1
answered on 19 Nov 2008, 12:11 PM
Thanks man
Tags
Dock
Asked by
Johnny Andersen
Top achievements
Rank 1
Answers by
Petko
Telerik team
Johnny Andersen
Top achievements
Rank 1
Share this question
or