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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...