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

Partial move in RadDock TitleTemplate

3 Answers 57 Views
Dock
This is a migrated thread and some comments may be shown as answers.
federico
Top achievements
Rank 1
federico asked on 30 Jul 2008, 12:37 PM
Hello,

I have a RadDock with 

dock.DockHandle = DockHandle.TitleBar;

I use template for dock.TitleTemplate and
template for dock.ContentTemplate;

All components of TitleBar cause a move(drag drop) of RadDock.

I would like that a Image and HyperLink component  in my TitleTemplate not cause move (drag and drop) of titleBar. It's possible?

Please Help me

3 Answers, 1 is accepted

Sort by
0
Obi-Wan Kenobi
Top achievements
Rank 1
answered on 30 Jul 2008, 12:41 PM
You can set DragHandle on the client to an heml element:
http://www.telerik.com/DEMOS/ASPNET/Prometheus/Dock/Examples/SetDragHandleClientSide/DefaultCS.aspx
Hope this helps!
0
federico
Top achievements
Rank 1
answered on 30 Jul 2008, 12:43 PM
Yes, but this exemple use 
 dock.DockMode = DockMode.None;
and not use TitleTemplate
I use a TitleTemplate UserControl

Thanks,
0
Sophy
Telerik team
answered on 30 Jul 2008, 04:22 PM
Hi Federico,

You can set an element client-side to be recognized as the drag element using the RadDock object's client-side method set_handle. You can set only one element as dock's handle. For example if you want to set an image from the titlebar as a dock's handler you can do it in the following way:
<script type="text/javascript">  
    function SetHandleDock(dock, args)  
    {  
      dock.set_handle($get("Handle_" + dock.get_id()));  
    }  
</script> 
<asp:ScriptManager id="ScriptManager1" runat="server"></asp:ScriptManager> 
<telerik:raddock id="RadDock1" runat="server" onclientinitialize="SetHandleDock">  
    <titlebartemplate> 
        <img id="Handle_RadDock1" src="test.jpg" alt="Image"  height="10px" width="10px"/>  
    </titlebartemplate> 
    <contenttemplate> 
        You can drag this object using the image above  
    </contenttemplate> 
</telerik:raddock>  

Let us know if you need further assistance.

All the best,
Sophy
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Dock
Asked by
federico
Top achievements
Rank 1
Answers by
Obi-Wan Kenobi
Top achievements
Rank 1
federico
Top achievements
Rank 1
Sophy
Telerik team
Share this question
or