SpreadJS Documentation
onOpenMenu Method
GC.Spread.Sheets.ContextMenu Namespace > ContextMenu type : onOpenMenu Method
open context menu
Syntax
var instance = new GC.Spread.Sheets.ContextMenu.ContextMenu();
var value; // Type: boolean
value = instance.onOpenMenu(menuData, itemsDataForShown, hitInfo, spread);
function onOpenMenu( 
   menuData : any,
   itemsDataForShown : any,
   hitInfo : Object,
   spread : Object
) : boolean;

Parameters

menuData
itemsDataForShown
hitInfo
spread
Example
$(document).ready(function () {
   var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
   function ContextMenu(){}
   ContextMenu.prototype = new GC.Spread.Sheets.ContextMenu.ContextMenu(spread);
   ContextMenu.prototype.onOpenMenu = function (menuData, itemsDataForShown, hitInfo, spread) {
          console.log(menuData);
          console.log(itemsDataForShown);
          console.log(hitInfo);
          console.log(spread);
          //you can change itemsDataForShown to change filter result
          //if you only want to change filter result,return false or don't return anything
          //you also can open your own context menu,if you want to do this,return true
          //return true;
   };
   var contextMenu = new ContextMenu();
   spread.contextMenu = contextMenu;
});
See Also

Reference

ContextMenu type