Jump to content

Error in the UnidbGrid popup menu. [ SOLVED ]


Fábio Matte

Recommended Posts

Good afternoon, I have a problem putting my PopUp menu in UnidbGrid.

 

Until version 1398 was working, and now in version 1466 the menu opens in different place from where I click. See the image, where is the red arrow is where I click, and the popup opens higher. How to correct?

post-4883-0-69318000-1529435325_thumb.png

Link to comment
Share on other sites

In UniDbGrid in 'OnAjaxEvent' I put this code:
procedure TfrmPainelContAbastecimento.gridResultadoAjaxEvent(Sender: TComponent;
  EventName: string; Params: TUniStrings);
begin
  if EventName = 'popup' then
    subOpcoes.Popup(StrToInt(Params.Values['x']), StrToInt(Params.Values['y']));
end;

And in ExtEvents:

function mousedown(sender, x, y, eOpts)
{
    if (eOpts == 2) {
        Ext.defer(function(){
            ajaxRequest(sender, 'popup', ['x='+x, 'y='+y])
        }, 300);
    } 
}
Link to comment
Share on other sites

And even your code should work

 

Also try with "Sender":

...
UniPopupMenu1.Popup(StrToInt(Params.Values['x']), StrToInt(Params.Values['y']), Sender);

Or better to use (mousedown):

procedure TMainForm.UniDBGrid1CellContextClick(Column: TUniDBGridColumn; X,
  Y: Integer);
begin

end;
Link to comment
Share on other sites

 

And even your code should work

 

Also try with "Sender":

...
UniPopupMenu1.Popup(StrToInt(Params.Values['x']), StrToInt(Params.Values['y']), Sender);

Or better to use (mousedown):

procedure TMainForm.UniDBGrid1CellContextClick(Column: TUniDBGridColumn; X,
  Y: Integer);
begin

end;

 

 

I did the way you indicated, but it still remains in the wrong place. Attached image.

post-4883-0-96876000-1529438129_thumb.png

Abastecimento.rar

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