Fábio Matte Posted June 19, 2018 Share Posted June 19, 2018 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? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 19, 2018 Share Posted June 19, 2018 Hi, How do you use PopUp? Quote Link to comment Share on other sites More sharing options...
Fábio Matte Posted June 19, 2018 Author Share Posted June 19, 2018 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); } } Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 19, 2018 Share Posted June 19, 2018 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; Quote Link to comment Share on other sites More sharing options...
Fábio Matte Posted June 19, 2018 Author Share Posted June 19, 2018 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. Abastecimento.rar Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 19, 2018 Share Posted June 19, 2018 Can you please report to support portal with a simple testcase ? Quote Link to comment Share on other sites More sharing options...
Fábio Matte Posted June 19, 2018 Author Share Posted June 19, 2018 Can you please report to support portal with a simple testcase ? You have a compressed .pas and .fdm file in the previous comment. Quote Link to comment Share on other sites More sharing options...
Fábio Matte Posted June 27, 2018 Author Share Posted June 27, 2018 Problem solved. My code was like this: Suboption Person.Popup (X, Y); And then I added the name of my dbunigrid in the code and it worked. suboption.Popup (X, Y, gridData); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.