Here's the correct way to add a client-side event handler for the expanded event
var radDock = $find('MyRadDock');
if (radDock) {
radDock.add_expanded(function () {
// Your code here for handling the expansion event
alert("The RadDock has been expanded!");
});
}
You will need to use the OnClientCommand client-side event of RadDock which will tell you when the Expand / Collapse button is clicked: https://demos.telerik.com/aspnet-ajax/dock/examples/clientsideevents/defaultcs.aspx.
You can find a list of all client-events at https://docs.telerik.com/devtools/aspnet-ajax/controls/dock/client-side-programming/events/overview.
Here's the correct way to add a client-side event handler for the expanded event