RadDock - how do you add an OnExpanded Event????

0 Answers 53 Views
Dock
Jonathan
Top achievements
Rank 1
Veteran
Jonathan asked on 06 Jul 2023, 01:54 PM

Hi

How do you add a client side OnExpanded / OnClientExpanded?

 

I have tried... but I get an error add_expand is NOT A FUNCTION 

 

var radDock = $find('MyRadDock')

 

radDock.add_expand(function () {

    // Expand

}

Ideas?  thx

Rumen
Telerik team
commented on 07 Jul 2023, 12:12 PM

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

Neha
Top achievements
Rank 2
Iron
Iron
commented on 21 Jul 2023, 12:11 PM

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!");
    });
}
I hope it helps.

No answers yet. Maybe you can help?

Tags
Dock
Asked by
Jonathan
Top achievements
Rank 1
Veteran
Share this question
or