General Category > Help for ParamQuery Pro

contextmenu on tab

<< < (2/2)

arbyter:
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.

paramvir:
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.

arbyter:
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.

paramvir:
That's right, ui object is empty in that region.

Please add miscItems in contextMenu option to define context menu on that region:


--- Code: --- miscItems: function(evt, ui){
if( $(evt.originalEvent.target).is(".pq-grid-number-cell")){
//return menu items here.
return [{
    name: 'test',
    action: function(){
alert('test');
}
}]   
}
},

--- End code ---

Navigation

[0] Message Index

[*] Previous page

Go to full version