ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: arbyter on June 04, 2021, 03:53:15 pm
-
hi Paramvir
i am trying to implement a context-Menu on Tab. I think, this is not basicly implemented (could not find in the API-Doc), but maybe you can give me a hint how to create it.
-
I'm not clear about which tab. Could you please share a screenshot.
-
I would like to add a contextmenu similar to on contextMenu.headItems right on the tab.
-
Context menu is not supported outside the grid i.e., jQueryUI tabs.
In the upcoming version context menu would be supported on the integrated tabs as can be seen on the home page 2nd demo of spreadsheet.
https://paramquery.com/
-
thank you for your reply.
I cannot find "the home page 2nd demo of spreadsheet", your link leads just to the main page.
-
i am experimenting with contextmenu on grid: rightclick on the top-left grid corner does not deliver ui parameter. I would expect to have a grid-context ui there.
-
Please use context event.
https://paramquery.com/pro/api#event-context
ui argument has properties when context menu is activated on body cells, header cells or image, in other cases target of the context menu can be detected from evt.originalEvent.target.
-
thats what i am using. It delivers correct ui in cells, ui with -1 in rownumbers, but in the top left corner of the grid no ui is delivered.
-
That's right, ui object is empty in that region.
Please add miscItems in contextMenu option to define context menu on that region:
miscItems: function(evt, ui){
if( $(evt.originalEvent.target).is(".pq-grid-number-cell")){
//return menu items here.
return [{
name: 'test',
action: function(){
alert('test');
}
}]
}
},