Skip to main content
All docs
V25.1
  • ASPxClientGanttContextMenuEventArgs.objectInfo Property

    Gets information about the right-clicked object.

    #Declaration

    TypeScript
    objectInfo: any

    #Property Value

    Type Description
    any

    Information about the right-clicked object.

    #Remarks

    <dx:ASPxGantt ID="Gantt" ClientInstanceName="clientGantt" >
        //...
        <ClientSideEvents 
          ContextMenu="function(s, e) {
              if (e.objectInfo.key == 1)
                  e.cancel = true;
              else
                  menu.ShowAtPos(e.htmlEvent.x,e.htmlEvent.y);
          }
          ContextMenuCustomization="function(s, e) {
              e.cancel = true;
          } 
        />
    </dx:ASPxGantt>
    
    <dx:ASPxPopupMenu runat="server" ID="popup" ClientInstanceName="menu">
        <Items>
            <dx:MenuItem Text="Item1">
            </dx:MenuItem>
            <dx:MenuItem Text="Item2">
            </dx:MenuItem>
        </Items>
    </dx:ASPxPopupMenu>
    

    Run Demo: ASPxGantt - Context Menu Run Demo: MVCxGantt - Context Menu

    See Also