Jump to content

UniDBGrid and enter key


Recommended Posts

hi all  :mellow:
I developed an accounting software (VCL mode), I use DBGrid with the onkeypress event for moving the cursor to the next column, I search the forum there is some solution but the key to enter the mode changes in editon not the next column are there a solution for this problem?? :excl:


Link to comment
Share on other sites

  • 1 month later...
Hi Lion ;-)



Is that plugin still working? I've tried to use it with no success. 


It looks like doesn't do anything.


Unigui 0.96 + XE4.


If you press tab key the focus goes to the next column of the same row also in edition mode, so... I'd be happy if I could change RETURN by TAB when the grid is in editing mode. 


That's what I need but I don't know how to get it. Keys ExtEvents related to the grid only works when you are not editing.


Any idea?



Thank you very much.
Link to comment
Share on other sites



My users are used to using INTRO to move the focus along the controls so what I need is to simulate this behaviour when you are editing a grid.
The focus doesn't move when you press INTRO, it toggles between edit mode and selection mode and the focus is always on the same cell.
I've checked that if you are in edit mode and press TAB, the focus is moved to following column and remains in edit mode. That's just what I need but using INTRO instead of TAB.
So, if you capture the key pressed and check if the key code is INTRO, the grid is in edit mode and you change the key code by a TAB, I think the target behaviour could be achieved.
Thanks for your help.
Link to comment
Share on other sites



I think to replace the RETURN on the TAB (in the grid) is not the best idea!...


But, try (working properly if all columns editable)...


UniDBGrid1 -> ClientEvents -> ExtEvents -> function reconfigure

function reconfigure(sender, store, columns, oldStore, the, eOpts)
  for (var i = 0; i < columns.length; i++) {
  if (columns[i].getEditor()) {
  columns[i].getEditor().on('specialkey', function (field, e) {   
   if (e.getKey() == 13) {
     e.keyCode = e.TAB;          
     return e.keyCode;

Best regards.

Link to comment
Share on other sites

Hi Lion,


Yes, I have and it works fine, just as I expected. 


You are my hero!!!! 


I've been thinking about and my problem is I don't know how extjs works.


I think it is important to get advanced knowledge about extjs if you want to develop professional applications, so I'm planning to do an extjs course.


Thank you very much for your help.

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.

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...