Hi,
I want to add a contextmenu to the webgrid. But I could not found the event for a rightclick of the mouse.
I have put the webgrid in a div-section and bound the contextmenu to the div-tag, but then the contextmenu appears at wrong position (not there, where I rightclicked)
Any idea? Thanks
Man34 -
When trapping the right click event for the grid you use the client side event handler: CellClickHandler
Ex:
function UltraWebGrid1_CellClickHandler(gridName, cellId, button){ if(button == 2) { // Cancel the show of IE context menu event.returnValue = false; event.cancelBubble = true; // Show your context menu igmenu_showMenu('UltraWebMenu1', event); return true; } }
function
if
// Cancel the show of IE context menu
event
false
true
// Show your context menu
return true
Patrick
Hi Patrick,
thank you. I didnt know anything about the ClientSideEvent-class. Very helpful.
Man34,
Glad to help. Infragistics has a great online documentation site:
http://ko.infragistics.com/support/documentation.aspx#OnlineDocumentation
Under the controls and components section of the help you will find each of their controls. Within each controls section you will find the documentation of the CSOM (Client Side Object Model). It's a great resource.