Jump to content

Skip to the next line in a unidbgrid...


Recommended Posts

Hi,

 

Then try:

function reconfigure(sender, store, columns, oldStore, the, eOpts) {
    var grid = sender;
    for (var i = 0; i < columns.length; i++) {
        if (columns[i].getEditor()) {
            columns[i].getEditor().on('specialkey', function(field, e) {
                if (e.getKey() == 13) {
                    var store = grid.getStore();
                    var selModel = grid.getSelectionModel();
                    var selectedRecord = selModel.getLastSelected();
                    var recordIndex = store.indexOf(selectedRecord);
                    var nextRecord = store.getAt(recordIndex + 1);
                    if (nextRecord) {
                        selModel.select(nextRecord);
                    }
                }
            })
        }
    }
}

Best regards.

Link to post
Share on other sites

Alguém saberia alterar esta função para que ao avançar a linha o campo já fique em modo de edição, não sendo necessário dar outro clique para ficar em modo de edição.

 

Does anyone know how to change this function to move the line of the field that let in edit mode , there is no need to click another to stay in edit mode ?

 

function reconfigure(sender, store, columns, oldStore, the, eOpts) {
    var grid = sender;
    for (var i = 0; i < columns.length; i++) {
        if (columns.getEditor()) {
            columns.getEditor().on('specialkey', function(field, e) {
                if (e.getKey() == 13) {
                    var store = grid.getStore();
                    var selModel = grid.getSelectionModel();
                    var selectedRecord = selModel.getLastSelected();
                    var recordIndex = store.indexOf(selectedRecord);
                    var nextRecord = store.getAt(recordIndex + 1);
                    if (nextRecord) {
                        selModel.select(nextRecord);
                    }
                }
            })
        }
    }
}

 

 

Tks.

Link to post
Share on other sites

Hi,

 

Try:

function reconfigure(sender, store, columns, oldStore, the, eOpts) {
    var grid = sender;
    for (var i = 0; i < columns.length; i++) {
        if (columns[i].getEditor()) {
            columns[i].getEditor().on('specialkey', function(field, e) {
                if (e.getKey() == 13) {
                    var store = grid.getStore();
                    var selModel = grid.getSelectionModel();
                    var selectedRecord = selModel.getLastSelected();
                    var recordIndex = store.indexOf(selectedRecord);
                    var nextRecord = store.getAt(recordIndex + 1);
                    if (nextRecord) {
                        selModel.select(nextRecord);
                        if (grid.editingPlugin && grid.uniRow && grid.uniCol){
                          var _row = grid.uniRow;
                          var _col = grid.uniCol;
                          setTimeout(function(){
                            grid.editingPlugin.startEdit(_row, _col);
                          }, 10);
                        }
                    }
                }
            })
        }
    }
}

Best regards.

Link to post
Share on other sites
  • 1 year later...

I tried, but when it comes to the last line and the last column it does nothing. Even clicking enter nothing happens.

 

If the grid does not have any record when it will include the first record and you get in the last column nothing will happen as well.

Link to post
Share on other sites

Hi Eduardo,

 

 

I am using the trial version 1.00RC1385. I'm doing some registration screens that I use on my desktop system, if it works I'll buy unigui this week.
 
Thank you for your help!!

 

 

Thank you!

 

Yes, it can be done,
By the way, you can make a test case, and give us a download link

We will try to analyze it and find a solution.

 

Best regards,

Link to post
Share on other sites

Hi,

 

Thank you!

 

OK.

 

And if your portal email and forum email are different, then please first visit here:

http://forums.unigui.com/index.php?/topic/6291-important-announcement/

 

Best regards,

 

The emails are the same but I have not received access to the client portal yet. How much time do I get? I made the payment yesterday with a credit card.

Link to post
Share on other sites
  • Administrators

The emails are the same but I have not received access to the client portal yet. How much time do I get? I made the payment yesterday with a credit card.

 

Thanks for your order.

 

All emails are sent to your email edua..@gmail.com immediately after purchase.

 

Can you please check junk folder too?

Link to post
Share on other sites

Hi Eduardo,

 

Can you make a simple testcase for this ?!

 

 

Good afternoon, can anyone help me? I would like my grid to click on the Enter it jumps between the columns and not between the lines as shown here. Has as?

 

Like as TAB ?!

 

 

Best regards,

Link to post
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...