KingOrmon Posted June 27, 2022 Share Posted June 27, 2022 Hi, how can I implement this event under unigui desktop TUniDBGrid ? Regards Quote 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? Quote 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 Quote Link to comment Share on other sites More sharing options...
irigsoft Posted June 27, 2022 Share Posted June 27, 2022 . Quote 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? Quote Link to comment Share on other sites More sharing options...
KingOrmon Posted June 27, 2022 Author Share Posted June 27, 2022 No Quote 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] Quote 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. Quote 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... Quote 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? Quote 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. Quote 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? Quote 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; Quote 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 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.