# OnClientShown

(**RadContextMenu** only) The **OnClientShown** client-side event occurs when the context menu first appears, either in response to a right-click on one of its targets or a call to its **show** or **showAt** method.

The event handler receives two parameters:

1. The instance of the context menu firing the event.

2. An eventArgs parameter containing the following methods:

* **get_targetElement** returns a reference to the DOM element that was right-clicked to show the context menu. If the menu appeared in response to a call to the **show** or **showAt** method rather than a right-click on one of its targets, **get_targetElement** returns null.

* **get_domEvent** returns a reference to the DOM event.

You can use this event to initialize the context menu when it appears:

```ASP.NET
<script type="text/javascript">
    function initializeContextMenu(menu, args) {
        var target = args.get_targetElement();
        if (target)
            menu.get_items().getItem(1).disable();
    }
</script>

<telerik:RadContextMenu ID="RadContextMenu1" runat="server" OnClientShown="initializeContextMenu">
    <Items>
        ...
    </Items>
</telerik:RadContextMenu>
```

## See Also

* [RadContextMenu Object](https://www.telerik.com/products/aspnet-ajax/documentation/controls/menu/context-menus/radcontextmenu-object)

* [OnClientShowing](https://www.telerik.com/products/aspnet-ajax/documentation/controls/menu/client-side-programming/events/onclientshowing)

* [OnClientHidden](https://www.telerik.com/products/aspnet-ajax/documentation/controls/menu/client-side-programming/events/onclienthidden)

* [Overview](https://www.telerik.com/products/aspnet-ajax/documentation/controls/menu/client-side-programming/overview)

* [RadMenu and RadContextMenu Objects](https://www.telerik.com/products/aspnet-ajax/documentation/controls/menu/client-side-programming/objects/radmenu-and-radcontextmenu-objects)
