4 Answers, 1 is accepted
0
Vyrban
Top achievements
Rank 1
answered on 31 Jul 2009, 09:20 AM
Hi ajit
,
I got an example that behavior of the dock is near to the normal browser window: double click on the titlebar expand/collapse the dock.
Hope it can helps you. Here is the code:
I got an example that behavior of the dock is near to the normal browser window: double click on the titlebar expand/collapse the dock.
Hope it can helps you. Here is the code:
<body> |
<script type="text/javascript"> |
function toggle(titleBarContent) { |
var dock = titleBarContent.offsetParent.offsetParent.control; |
if(dock.get_collapsed()) |
dock.set_collapsed(false) |
else |
dock.set_collapsed(true) |
} |
</script> |
<form id="form1" runat="server"> |
<asp:ScriptManager ID="ScriptManager" runat="server"></asp:ScriptManager> |
<div> |
<telerik:RadDock ID="RadDock1" runat="server"> |
<TitlebarTemplate> |
<div ondblclick="toggle(this)"> |
Title |
</div> |
</TitlebarTemplate> |
<ContentTemplate> |
Dock Content |
</ContentTemplate> |
</telerik:RadDock> |
</div> |
</form> |
</body> |
0
ajit
Top achievements
Rank 1
answered on 31 Jul 2009, 02:14 PM
Hi Vyrban,
Thank you for your reply. Actually i am generating the docks dynamically so i am not sure whether supplying a div tag would work in my case. So is there a way i can supply this functionality dynamically.
Thank you,
Regards,
Ajit
Thank you for your reply. Actually i am generating the docks dynamically so i am not sure whether supplying a div tag would work in my case. So is there a way i can supply this functionality dynamically.
Thank you,
Regards,
Ajit
0
Mr. Plinko
Top achievements
Rank 1
answered on 31 Jul 2009, 02:35 PM
I have this functionality and used this Double Click RadDock Collapse thread to help me out.
to do this in JavaScript. The sample code is
to do this in JavaScript. The sample code is
<html xmlns="http://www.w3.org/1999/xhtml" > |
<head runat="server"> |
<title>Untitled Page</title> |
</head> |
<body> |
<form id="form1" runat="server"> |
<asp:scriptmanager id="ScriptManager1" runat="server"> |
</asp:scriptmanager> |
<telerik:RadDock ID="RadDock1" runat="server" text="Test" onclientinitialize="OnClientInitialize"> |
</telerik:RadDock> |
<script type="text/javascript"> |
function OnClientInitialize(sender, args) |
{ |
$addHandlers(sender._handle, {"dblclick": myHandler}, sender); |
} |
function myHandler() |
{ |
var isCollapsed = !this.get_collapsed(); |
this.set_collapsed(isCollapsed); |
this.updateClientState(); |
} |
</script> |
</form> |
</body> |
</html> |
0
ajit
Top achievements
Rank 1
answered on 31 Jul 2009, 02:58 PM
Hello Mr. Plinko ,
Thank you very much, it did solve my problem. Appreciate all your help.
Regards,
Ajit
Thank you very much, it did solve my problem. Appreciate all your help.
Regards,
Ajit