New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial
OnClientDockPositionChanged
The OnClientDockPositionChanged client-side event occurs when the user has just changed the position of a RadDock control by dragging it to a new location.This event occurs before the server-side OnDockPositionChanged event or client-side OnClientDragEnd event.
The event handler receives a single parameter: the instance of the RadDock control that has just been moved. It's properties have already been updated to reflect its new position.
Unlike the server-side OnDockPositionChanged event, OnClientDockPositionChanged occurs even if the RadDock control is dropped in the same position that it started.
The following example uses the OnClientDockPositionChanged event to pin a RadDock control if it is dragged to a floating position:
ASP.NET
<script type="text/javascript">
function PinFloats(dock)
{
var id = dock.get_dockZoneID();
if (id == "")
{
dock.set_pinned(true);
}
}
</script>
<telerik:RadDockLayout ID="RadDockLayout1" runat="server">
<telerik:RadDockZone ID="RadDockZone1" runat="server">
<telerik:RadDock
ID="RadDock1"
runat="server"
OnClientDockPositionChanged="PinFloats"
DefaultCommands="All" />
</telerik:RadDockZone>
</telerik:RadDockLayout>