geison.shida Posted November 28, 2019 Share Posted November 28, 2019 Good Morning, I am using Unigui version 1.90.0.1506 . I am wanting to use in UniDBGrid the KeyDown and Keypress events in ExtEvents property When I use these events in a Form, there are in the parameters of these functions the sender, so at a given moment of the function I call the command "ajaxRequest (sender, 'grid_numero', ['key =' + vKey])" and with that in the event from form "AjaxEvent" I get it through the command: if sametext (EventName, 'grid_numero') then begin commands to execute; end But if I try to do the same process to use UniDBGrid as the keydown or keypress, in these functions there is no sender parameter, so when in the functions (keydown or keypress) I call the command "ajaxRequest (sender, 'grid_numero', [' key = '+ vKey]) ", in UniDBGrid's" AjaxEvent "event nothing happens with the command below: if sametext (EventName, 'grid_numero') then begin commands to execute; end I know it's no use passing sender on the ajaxrequest command, but I don't know what to pass in place of sender, I tried to pass the other parameters (e, t or Opts), but it didn't work. I would like to be shown where I am going wrong and if possible give me an example of how to use keydown and keypress in UniDBGrid. Best regards, Geison C. Shida Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 28, 2019 Share Posted November 28, 2019 Hello, 1 hour ago, geison.shida said: I am wanting to use in UniDBGrid the KeyDown and Keypress events. And what if you will use OnKeyDown, OnKeyPress events!? 1 hour ago, geison.shida said: I know it's no use passing sender on the ajaxrequest command, but I don't know what to pass in place of sender, I tried to pass the other parameters (e, t or Opts), but it didn't work. function keydown(e, t, eOpts) { ajaxRequest(this.grid, ......) } Quote Link to comment Share on other sites More sharing options...
geison.shida Posted November 28, 2019 Author Share Posted November 28, 2019 Sherzod, Thank you very much. Worked perfectly. Best regards, Geison C. Shida 1 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.