milton luiz Posted June 11, 2021 Posted June 11, 2021 use this function in UniDbGrid to jump to the next line pressing enter and put the field in edit mode not needing another enter. in version 0.99 of unigui it works already in version 1.90 it is not working. can someone help? function reconfigure(sender, store, columns, oldStore, oldColumns, eOpts) { var grid = sender;for (var i = 0; i < columns.length; i++) { columns.editor = {selectOnFocus: true}; //seleciona o texto 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); } } } }) } } } Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.