sicoobcooplivre Posted May 23, 2023 Share Posted May 23, 2023 @Sherzod Good afternoon! I have a unidbgrid and the RowEditor property is active! Is there a possibility that I send a command to execute the RowEditor's save button? The user forgets to click save, and I need to run it if he leaves the unidgrid to run another function! Thanks! Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 23, 2023 Share Posted May 23, 2023 15 minutes ago, sicoobcooplivre said: The user forgets to click save Hello, Also this post may help you: Quote Link to comment Share on other sites More sharing options...
sicoobcooplivre Posted May 23, 2023 Author Share Posted May 23, 2023 @Sherzod Good afternoon! So, it helped me yes, but what I need is not to cancel if the user leaves the grid, but to record... I found a post where they said to use the same as below to edit, it worked to edit: JSInterface.JSCode('var me='#1'; ed=me.getSelectionModel().getCurrentPosition(); me.editingPlugin.startEdit(ed.row, ed.column);'); Wouldn't it be possible to execute the "save" button in a similar way? something like: me.editingPlugin.save.click();'); ... ? Thank you very much! Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 23, 2023 Share Posted May 23, 2023 1 hour ago, sicoobcooplivre said: something like: me.editingPlugin.save.click();'); ... ? Have you tried just using the Post method of your DataSet? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 23, 2023 Share Posted May 23, 2023 Also try this: procedure TMainForm.UniButton1Click(Sender: TObject); begin with UniDBGrid1 do JSInterface.JSCall('editingPlugin.completeEdit', []) end; Quote Link to comment Share on other sites More sharing options...
sicoobcooplivre Posted May 23, 2023 Author Share Posted May 23, 2023 It worked out! Thank you very much! Quote Link to comment Share on other sites More sharing options...
风吹小机机 Posted May 24, 2023 Share Posted May 24, 2023 Make a mark, you can use it next time 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.