Click or drag to resize
KaxSchedulerContextMenuEventArgs Class
Provides data for the ContextMenuItemClick event of the KaxTreeView control. This class cannot be inherited.
Inheritance Hierarchy
SystemObject
  SystemEventArgs
    Kettic.AspNet.ControlsKaxSchedulerContextMenuEventArgs

Namespace: Kettic.AspNet.Controls
Assembly: Kettic.AspNet.Controls (in Kettic.AspNet.Controls.dll) Version: 2014.4.1129.0 (2014.04.1129.0)
Syntax
public sealed class KaxSchedulerContextMenuEventArgs : EventArgs

The KaxSchedulerContextMenuEventArgs type exposes the following members.

Constructors
  NameDescription
Public methodKaxSchedulerContextMenuEventArgs
Initializes a new instance of the KaxTreeViewContextMenuEventArgs class.
Top
Properties
  NameDescription
Public propertyAppointment
Gets the referenced KaxTreeNode in the KaxTreeView control when the event is raised.
Public propertyMenuItem
Gets the referenced KaxMenuItem in the KaxTreeViewContextMenu control when the event is raised.
Top
Remarks

The ContextMenuItemClick event is raised when an item in the KaxTreeViewContextMenu of the KaxTreeView control is clicked.

A click on a KaxTreeViewContextMenu item of the KaxTreeView makes a postback only if an event handler is attached to the ContextMenuItemClick event.

Examples
The following example demonstrates how to display information about the clicked item in the KaxTreeViewContextMenu shown after a right-click on a KaxTreeNode.
<%@ Page Language="C#" AutoEventWireup="true" %>
<%@ Register TagPrefix="Kettic" Namespace="Kettic.AspNet.Controls" Assembly="Kettic.AspNet.Controls" %>

<script runat="server">
    void KaxTreeView1_ContextMenuItemClick(object sender, KaxTreeViewContextMenuEventArgs e)
    {
        lblInfo.Text = string.Format(@"You clicked on Menu Item {0}(""{1}"") of Node {2}(""{3}"")",
            e.MenuItem.Index, e.MenuItem.Text, e.Node.Index, e.Node.Text);
    }
</script>

<html>
<body>
<form id="form1" runat="server">
<Kettic:KaxScriptManager ID="KaxScriptManager1" runat="server"></Kettic:KaxScriptManager>
<br />
<asp:Label ID="lblInfo" style="border:solid 1px black; background-color:InfoBackground;font:normal 12px Courier New;" runat="server">Click on a context menu item to see the information for it.</asp:Label>
<br />
<Kettic:KaxTreeView ID="KaxTreeView1" runat="server" OnContextMenuItemClick="KaxTreeView1_ContextMenuItemClick">
    <ContextMenus>
        <Kettic:KaxTreeViewContextMenu ID="ContextMenu1">
            <Items>
                <Kettic:KaxMenuItem Text="Menu1Item1"></Kettic:KaxMenuItem>
                <Kettic:KaxMenuItem Text="Menu1Item2"></Kettic:KaxMenuItem>
            </Items>
        </Kettic:KaxTreeViewContextMenu>
        <Kettic:KaxTreeViewContextMenu Skin="Outlook" ID="ContextMenu2">
            <Items>
                <Kettic:KaxMenuItem Text="Menu2Item1"></Kettic:KaxMenuItem>
                <Kettic:KaxMenuItem Text="Menu2Item2"></Kettic:KaxMenuItem>
            </Items>
        </Kettic:KaxTreeViewContextMenu>
    </ContextMenus>
    <Nodes>
        <Kettic:KaxTreeNode Text="Node1" ContextMenuID="ContextMenu2">
            <Nodes>
                <Kettic:KaxTreeNode Text="Node11" ContextMenuID="ContextMenu2"></Kettic:KaxTreeNode>
                <Kettic:KaxTreeNode Text="Node12" ContextMenuID="ContextMenu2"></Kettic:KaxTreeNode>
            </Nodes>
        </Kettic:KaxTreeNode>
        <Kettic:KaxTreeNode Text="Node2" ContextMenuID="ContextMenu2">
            <Nodes>
                <Kettic:KaxTreeNode Text="Node21" ContextMenuID="ContextMenu2"></Kettic:KaxTreeNode>
                <Kettic:KaxTreeNode Text="Node22" ContextMenuID="ContextMenu2"></Kettic:KaxTreeNode>
            </Nodes>
        </Kettic:KaxTreeNode>
    </Nodes>
</Kettic:KaxTreeView>

</form>
</body>
</html>
See Also