Posted 25 September 2017, 10:44 pm EST
Hi Team,
we are using spreadsheets 10 with angular js and we have a requirement to add context menu on right click to the cells. How can we proceed? Please provide some examples.
Thanks, KVK.
Forums Home / Spread / DevChannel
Posted by: kvk04101985 on 25 September 2017, 10:44 pm EST
Posted 25 September 2017, 10:44 pm EST
Hi Team,
we are using spreadsheets 10 with angular js and we have a requirement to add context menu on right click to the cells. How can we proceed? Please provide some examples.
Thanks, KVK.
Posted 25 September 2017, 10:44 pm EST
Hello,
This is the documentation page for using Angular with Spread.Sheets:
http://sphelp.grapecity.com/webhelp/SpreadSheets10/webframe.html#angular.html
In addition, I’ve attached a sample that shows how to use the two together as well.
In regards to showing a context menu on right-click, Spread.Sheets does not have any context menus built into it, so you would need to write your own code for that. However, the code in this documentation page should be useful in determining which cell is being clicked on:
http://sphelp.grapecity.com/webhelp/SpreadSheets10/webframe.html#scxyindex.html
The only difference is that the code in that page is for left-clicking, so it would need to be changed a little to something like this for right-clicking:
Let me know if that helps.
In addition, please do not submit multiple forum posts for the same issue.
Regards, Kevin 2017/06/sjs-angula2-demo.zip
Posted 26 July 2018, 8:03 pm EST
var spread = new GC.Spread.Sheets.Workbook(document.getElementById(“ss”), { sheetCount: 1 });
var selectWithABackgroundColor = { text: 'Open Dialog', name: 'openDialog', command: showLoginDialog, workArea: 'viewport'//rowHeader }; spread.contextMenu.menuData.push(selectWithABackgroundColor); function showLoginDialog() { alert('gg'); } $.each(spread.contextMenu.menuData, function (p, v) { if (v.name === 'openDialog') { spread.contextMenu.menuData.splice(0,p-1) } });