yoser174 Posted November 24, 2019 Share Posted November 24, 2019 Dear uniGUI team, if we activate goEditing on StringGrid, we need to click double click to show editor on the cell. how to show cell editor when user focus or clicked on the cell without need double click or press F2? I want to create application, user can edit value on column "Hasil" it need to double clicked on the cell, is it posible to auto show editor when cell focused or single clicked? And after enter value focus change to next row and editor also shown: looking fordward for your reply Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 24, 2019 Share Posted November 24, 2019 57 minutes ago, yoser174 said: or clicked on the cell without need double click Hello, This post may help you: http://forums.unigui.com/index.php?/topic/11553-change-cell-tunistringgrid/&do=findComment&comment=61330 Quote Link to comment Share on other sites More sharing options...
yoser174 Posted December 1, 2019 Author Share Posted December 1, 2019 Dear Sherzod, Thank you, it is working perfect. please help me one more: after press key <ENTER/RETURN> move to next row, and show editor: like picture above, after input value 3.2 on the cell and after press <ENTER/RETURN> key, cursor move to next row. how do I can perform that event? thank you before. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 1, 2019 Share Posted December 1, 2019 8 hours ago, yoser174 said: like picture above, after input value 3.2 on the cell and after press <ENTER/RETURN> key, cursor move to next row. Hi, I will try... 1 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 1, 2019 Share Posted December 1, 2019 14 hours ago, yoser174 said: like picture above, after input value 3.2 on the cell and after press <ENTER/RETURN> key, cursor move to next row. Maybe something like this for start: function reconfigure(sender, store, columns, oldStore, oldColumns, eOpts) { var grid = sender; var lockedGrid = grid.lockedGrid; var fixedColLength=0; 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) { grid.editingPlugin.completeEdit(); Ext.defer(function() { selModel.select(nextRecord); if (lockedGrid) { fixedColLength = lockedGrid.columnManager.columns.length; } grid.editingPlugin.startEditByPosition({ row: grid.uniRow, column: grid.uniCol + fixedColLength }, true); }, 50); } } }) } } } Quote Link to comment Share on other sites More sharing options...
yoser174 Posted December 14, 2019 Author Share Posted December 14, 2019 Dear Sherzod, thank you for your help, amazing Almost complete, the selected row change to next row. But bit wired the editor not changed (keep at current row). How do we can change the editor after row changed, I mean after enter, row change to next row, but when we press ENTER the editor also move to the selected row.? Quote Link to comment Share on other sites More sharing options...
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.