Edit this page

Redirecting from a Context Menu Selection

To redirect to another web page based on clicking a Context Menu, set the OnClientContextMenuClicking property to a JavaScript function that takes two arguments:

  • sender: a reference to the RadTreeView

  • eventArgs: contains a reference to the clicked Menu Item, the Node under the Context Menu and the set_cancel() function used for aborting the Context Menu click.

The example below gets the Context Menu Item and sets the window url.

<telerik:RadTreeView RenderMode="Lightweight" ID="RadTreeView1" runat="server" 
function clientContextMenuClicking(sender, eventArgs) {
    var menuItem = eventArgs.get_menuItem();
    window.location.href = "http://en.wikipedia.org/wiki/" + menuItem.get_text();
Is this article helpful? No Yes
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article