Jump to content

keydown and keypress on UniDBGrid


geison.shida

Recommended Posts

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
Link to comment
Share on other sites

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, ......)
}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...