Back to Devexpress

ASPxClientGanttContextMenuEventArgs.objectInfo Property

aspnet-js-aspxclientganttcontextmenueventargs-26ff2df9.md

latest1.4 KB
Original Source

ASPxClientGanttContextMenuEventArgs.objectInfo Property

Gets information about the right-clicked object.

Declaration

ts
objectInfo: any

Property Value

TypeDescription
any

Information about the right-clicked object.

|

Remarks

aspx
<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

ASPxClientGanttContextMenuEventArgs Class

ASPxClientGanttContextMenuEventArgs Members