Click or drag to resize
KaxNavigationBarOnClientContextMenu Property
Gets or sets a value indicating the client-side event handler that is called before the browser context panel shows (after right-clicking an item).

Namespace: Kettic.AspNet.Controls
Assembly: Kettic.AspNet.Controls (in Kettic.AspNet.Controls.dll) Version: 2014.4.1129.0 (2014.04.1129.0)
Syntax
public string OnClientContextMenu { get; set; }

Property Value

Type: String
A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.
Remarks

Use the OnClientContextMenu property to specify a JavaScript function that will be executed before the context menu shows after right clicking an item.

Two parameters are passed to the handler

  • sender (the client-side KaxNavigationBar object)
  • eventArgs with two properties
    • Item - the instance of the selected item
    • EventObject - the browser DOM event
Examples
The following example demonstrates how to use the OnClientContextpanel property.

<script language="javascript">
function OnContextpanelHandler(sender, eventArgs)
{
var navigationbar = sender;
var item = eventArgs.Item;

alert("You have right-clicked the " + item.Text + " item in the " + navigationbar.ID + "navigationbar.");
}
</script>

<kaxP:KaxNavigationBar id="KaxNavigationBar1" runat="server" OnClientContextpanel="OnContextpanelHandler">
<Items>
<kaxP:KaxNavigationItem Text="Personal Details"></kaxP:KaxNavigationItem>
<kaxP:KaxNavigationItem Text="Education"></kaxP:KaxNavigationItem>
<kaxP:KaxNavigationItem Text="Computing Skills"></kaxP:KaxNavigationItem>
</Items>
</kaxP:KaxNavigationBar>

See Also