Jump to content

Skip to the next line in a unidbgrid...


milton luiz

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...