eduardosuruagy Posted September 3, 2018 Share Posted September 3, 2018 I would like to click on a dbgrid column and open a poupup, how? Link to comment Share on other sites More sharing options...
Sherzod Posted September 3, 2018 Share Posted September 3, 2018 Hi, Can you please explain in more details ?! Link to comment Share on other sites More sharing options...
eduardosuruagy Posted September 3, 2018 Author Share Posted September 3, 2018 Como a imagem mostra: 1º Quando você clica na coluna 2º Abre um menu Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted September 4, 2018 Share Posted September 4, 2018 Hi You can use OnCellClick event. Link to comment Share on other sites More sharing options...
eduardosuruagy Posted September 4, 2018 Author Share Posted September 4, 2018 This I already do, but I wanted a way that would run from the client side and not from the server. On the client side it gets much faster Link to comment Share on other sites More sharing options...
Sherzod Posted September 4, 2018 Share Posted September 4, 2018 Hi, Do you create a popupmenu on the client side too ? Link to comment Share on other sites More sharing options...
eduardosuruagy Posted September 4, 2018 Author Share Posted September 4, 2018 No, the popupmenu is already added to the form, I would just like to open it when the user clicks on the column I showed in the image. Link to comment Share on other sites More sharing options...
eduardosuruagy Posted September 6, 2018 Author Share Posted September 6, 2018 DD, can you help me with this question? Link to comment Share on other sites More sharing options...
belo Posted September 7, 2018 Share Posted September 7, 2018 Tip of http://forums.unigui.com/index.php?/topic/1149-cell-grid-position/ Try This In UniDBGrid > ExtEvents > Ext.grid.Panel function cellmousedown(sender, td, cellIndex, record, tr, rowIndex, e, eOpts){ var c = Ext.get(td).getXY(); ajaxRequest(this, 'CellXY', ['x='+c[0], 'y='+c[1]]); } In VCL... private { Private declarations } ColIndex, RowIndex: Integer; public { Public declarations } end; implementation {$R *.dfm} uses MainModule; procedure TMainForm.UniDBGrid1AjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin if EventName = 'CellXY' then begin ColIndex := Params['x'].AsInteger; RowIndex := Params['y'].AsInteger end; end; procedure TMainForm.UniDBGrid1CellClick(Column: TUniDBGridColumn); begin UniPopupMenu1.Popup(ColIndex + Column.Width, RowIndex); end; Best regards, Eduardo Belo Link to comment Share on other sites More sharing options...
eduardosuruagy Posted September 10, 2018 Author Share Posted September 10, 2018 UniPopupMenu1.Popup(ColIndex + Column.Width, RowIndex, dbgrid_cadastro2); Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now