Jump to content

PopUpMenu on UniStringGrid


bolossis

Recommended Posts

How can i execute a UniPopUpMenu on UniStringGrid??

 

I found your example but this works only for UniDbGrid

 

procedure TMainForm.UniDBGrid1CellContextClick(Column: TUniDBGridColumn; X,
  Y: Integer);
begin
PopupMenu1.Popup(X,Y);
end;
Link to comment
Share on other sites

Hi,

 

Can you try this approach?:

 

1.

function mousedown(sender, x, y, eOpts)
{
    if (eOpts == 2) {
        Ext.defer(function(){
            ajaxRequest(sender, 'popup', ['x='+x, 'y='+y])
        }, 300);
    }    
}

2.

procedure TMainForm.UniStringGrid1AjaxEvent(Sender: TComponent;
  EventName: string; Params: TUniStrings);
begin
  if EventName = 'popup' then
    UniPopupMenu1.Popup(StrToInt(Params.Values['x']), StrToInt(Params.Values['y']));
end;

Best regards,

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...