Click or drag to resize
KaxTabControlOnClientContextMenu Property
Gets or sets a value indicating the client-side event handler that is called before the browser context menu 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 a tab.

Two parameters are passed to the handler

  • sender (the client-side KaxTabControl object)
  • eventArgs with two properties
    • tab - the instance of the selected tab
    • domEvent - the browser DOM event
Examples
The following example demonstrates how to use the OnClientContextMenu property.

<script language="javascript">
function OnContextMenuHandler(sender, eventArgs)
{
var tabControl = sender;
var tab = eventArgs.get_tab();

alert("You have right-clicked the " + tab.get_text() + " tab in the " + tabControl.get_id() + "tabcontrol.");
}
</script>

<kettic:KaxTabControl id="KaxTabControl1" runat="server" OnClientContextMenu="OnContextMenuHandler">
<Tabs>
<kettic:KaxTab Text="Personal Details"></kettic:KaxTab>
<kettic:KaxTab Text="Education"></kettic:KaxTab>
<kettic:KaxTab Text="Computing Skills"></kettic:KaxTab>
</Tabs>
</kettic:KaxTabControl>

See Also