KingOrmon Posted June 27, 2022 Share Posted June 27, 2022 Hi, how can I implement this event under unigui desktop TUniDBGrid ? Regards Link to comment Share on other sites More sharing options...
Sherzod Posted June 27, 2022 Share Posted June 27, 2022 22 minutes ago, KingOrmon said: how can I implement this event under unigui desktop TUniDBGrid ? Hello, Yes, it is possible. But clarify for what purpose? Link to comment Share on other sites More sharing options...
KingOrmon Posted June 27, 2022 Author Share Posted June 27, 2022 I would like to intercept this event for show a menu when I click and hold in a item row of TUniDBGrid but If I make a simple click execute default event CellClick Link to comment Share on other sites More sharing options...
irigsoft Posted June 27, 2022 Share Posted June 27, 2022 . Link to comment Share on other sites More sharing options...
Sherzod Posted June 27, 2022 Share Posted June 27, 2022 26 minutes ago, KingOrmon said: I would like to intercept this event for show a menu when I click and hold in a item row of TUniDBGrid Are you using RowSelectionModel? Link to comment Share on other sites More sharing options...
KingOrmon Posted June 27, 2022 Author Share Posted June 27, 2022 No Link to comment Share on other sites More sharing options...
KingOrmon Posted June 27, 2022 Author Share Posted June 27, 2022 I dont know about rowselectionmodel I have these options in Grid [dgEditing,dgTitles,dgIndicator,dgColumnResize,dgColLines,dgRowLines,dgRowSelect,dgConfirmDelete] Link to comment Share on other sites More sharing options...
Sherzod Posted June 27, 2022 Share Posted June 27, 2022 8 minutes ago, KingOrmon said: dgRowSelect This is the RowSelectionModel. Link to comment Share on other sites More sharing options...
Sherzod Posted June 27, 2022 Share Posted June 27, 2022 I'll check. Of course there is the taphold event. But it seems there may be a problem with the selection of the cell... Link to comment Share on other sites More sharing options...
Sherzod Posted June 27, 2022 Share Posted June 27, 2022 1 hour ago, KingOrmon said: for show a menu Will you use UniPopupMenu? Link to comment Share on other sites More sharing options...
KingOrmon Posted June 27, 2022 Author Share Posted June 27, 2022 I think that I will use a TForm with options. But UniPopupMenu could be an option too. Link to comment Share on other sites More sharing options...
Sherzod Posted June 27, 2022 Share Posted June 27, 2022 16 minutes ago, KingOrmon said: I think that I will use a TForm with options. Modal form, centered? Link to comment Share on other sites More sharing options...
Sherzod Posted June 27, 2022 Share Posted June 27, 2022 2 hours ago, KingOrmon said: how can I implement this event under unigui desktop TUniDBGrid ? For example, try. 1. UniDBGrid1 -> ClientEvents -> ExtEvents -> function afterrender(sender, eOpts) { sender.getEl().addListener('taphold', function (a, b) { sender.getSelectionModel().select(sender.getView().getRecord(b)); ajaxRequest(sender, '_taphold', []); }); } 2. UniDBGRid1 -> OnAjaxEvent -> procedure TMainForm.UniDBGrid1AjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin if EventName = '_taphold' then ShowMessage((Sender as TUniDBGrid).CurrRow.ToString + ' selected...'); end; Link to comment Share on other sites More sharing options...
KingOrmon Posted June 28, 2022 Author Share Posted June 28, 2022 works perfect! thank you 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