Jump to content

UniDBGrid - How start editing by keypress?


Volk65

Recommended Posts

  • 5 years later...

@Sherzod

Ok, now it works but not very well

it is like excel in one row only

you should only move the cursor by Tab not by Enter and when the row is finished it stops, not moving to the next row.

I think it is very limited not practical.

I can't depend on them if the customer want to work inside the grid in the invoices and vouchers.

for example:

The customer want to enter the barcode then the qty then the price and want to begin a new line by pressing Enter Key, like TDBGGrid

Link to comment
Share on other sites

On 9/19/2023 at 2:02 PM, Osama Ghazal said:

I think it is very limited not practical.

Sorry, this is what it is at the moment.

On 9/19/2023 at 2:02 PM, Osama Ghazal said:

The customer want to enter the barcode then the qty then the price and want to begin a new line by pressing Enter Key, like TDBGGrid

Although there was a solution to this on the forum.

Link to comment
Share on other sites

@Osama Ghazal

http://forums.unigui.com/index.php?/topic/14592-autoedit-in-unidbgrid/

or you can use

///////////////////////////////////////////////////

UniDBGRID>ExtEvents>reconfigure

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

///////////////////////////////////////////////////

But this will not work if in the main form you enabled keyPreview = True and Navigatekeys

 

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