Fires on the server side before a panel is docked in a zone and allows you to cancel the action.
public event DockZoneCancelEventHandler BeforeDock
Public Event BeforeDock As DockZoneCancelEventHandler
The BeforeDock event's data class is DockZoneCancelEventArgs. The following properties provide information specific to this event:
|Cancel||Gets or sets a value indicating whether the action that raised the event should be canceled.|
|Panel||Gets the panel currently being processed. Inherited from DockZoneEventArgs.|
Write a BeforeDock event handler to perform specific actions on the server side before every time the panel is docked. You can use the event parameter's property to identify a panel (DockZoneEventArgs.Panel) currently being processed.
Note that if the Cancel property is set to true in the event's handler, the execution of the current command is canceled, and therefore no further processing is performed (that is the panel is not docked).
The BeforeDock event fires when you dock a panel by dragging it only. If you dock a panel programmatically (e.g. by setting the ASPxDockPanel.OwnerZoneUID property) it does not result firing the event.
To learn more, see the Common Docking Events topic.