Sherzod Posted September 18, 2013 Posted September 18, 2013 Hello everybody! A Microsoft Excel grid plugin for Ext JS 4: http://www.lukehorvat.com/blog/excel-grid-plugin-for-ext-js-4/ https://gist.github.com/lukehorvat/5607821/raw/6fe2113b4946b36e8bcdf10a3904560ef9a00758/excel-grid-plugin.js How to use? 1. Download and paste the file in the directory ... \ files 2. UniServerModule> CustomFiles> files/excel-grid-plugin.js 3. UniDBGrid1> UniEvents> OnBeforeInit> function OnBeforeInit (sender) { sender.plugins = [{ptype: 'excelcellediting', clicksToEdit: 2}]; } Best Regards 3 Quote
wangxuebin Posted September 19, 2013 Posted September 19, 2013 thank you!your excel grid is what i want,I havd a small question,when i enter some chars in the cell and press the 'enter' key ,the cursor just skip to the cell of the same column of the next row,if i want the cursor skip to the cell of the next column of the same row,how to do it? Quote
Sherzod Posted September 19, 2013 Author Posted September 19, 2013 Hi wxb_km! In the script (excel-grid-plugin.js) find the lines sm.move (e.shiftKey? 'up' : 'down', e); And replace the "up" on the "left", "down" on the "right", ie sm.move (e.shiftKey? 'left' : 'right', e); Best Regards Quote
rencarnacion Posted September 19, 2013 Posted September 19, 2013 Thanks Work Great !! Ronny Encarnacion Quote
wangxuebin Posted September 20, 2013 Posted September 20, 2013 thank you!your work is very helpful ! Quote
wangxuebin Posted September 22, 2013 Posted September 22, 2013 Hi!Duser: After my using your Excel grid plugin,I found a problem.if your Excel grid plugin is used,when setting some columns's 'locked' property to true,the unidbgrid can't show. maybe your Excel grid plugin is incompatible in some extent? Is there a solution for this problem? thank you. Quote
Sherzod Posted September 25, 2013 Author Posted September 25, 2013 Hi!Duser: After my using your Excel grid plugin,I found a problem.if your Excel grid plugin is used,when setting some columns's 'locked' property to true,the unidbgrid can't show. maybe your Excel grid plugin is incompatible in some extent? Is there a solution for this problem? thank you. Hi wxb_km! Unfortunately yes, Excel grid plugin is incompatible in some extent ... I'll try to fix it ... Sincerely ... Quote
Sherzod Posted September 27, 2013 Author Posted September 27, 2013 Hi Farshad! When using this plugin, there is one nasty error, and one fatal error: 1. If the cell is active and click mouse to another row or to another column, there is an error row mismatch, if you go on the same row there is no error. 2. When using the locked property column is an error a.selModel is undefined. Can you give a solution or explanation ... If this functionality, the UniDBGrid would include by default, it would be great!!! Thanks in advance. Quote
Ulugbek Posted October 1, 2013 Posted October 1, 2013 What is a plus?What is this plugin?Can you explain briefly? Quote
Sherzod Posted October 1, 2013 Author Posted October 1, 2013 What is a plus? What is this plugin? Can you explain briefly? Hi Ulugbek. briefly... You've worked with excel sheet? This plugin provides a similar feature! Some of the advantages: 1. Can directly edit the cell without pressing enter. 2. After editing (when you press enter), go directly to the next cell. If you are going to edit directly in the grid, these features make it easy to work! This time, these features are not implemented in UniDBGrid. Best regards! Quote
Sherzod Posted November 23, 2013 Author Posted November 23, 2013 Hi Farshad! I use this plugin. If the cell is active and click mouse to another row or to another column, there is an error row mismatch, if you go on the same row there is no error. Can You correct this plugin? Thank you, Sincerely. Quote
Asiaapollo Posted December 1, 2013 Posted December 1, 2013 How to prevent cursor moving into hidden columns? Quote
Abaksoft Posted June 20, 2017 Posted June 20, 2017 Hello DD, Can this work with UniStringGrid ? I need the same behaviour :>>1. Can directly edit the cell without pressing enter.>>2. After editing (when you press enter), go directly to the next cell Thx Quote
Sherzod Posted June 20, 2017 Author Posted June 20, 2017 Hi, I need the same behaviour :>>1. Can directly edit the cell without pressing enter. Can you try this solution for now ?!: UniStringGrid1 -> ClientEvents -> ExtEvents -> function keydown: function keydown(e, t, eOpts) { var btn=e.button; if (btn == 36 || btn == 37 || btn == 38 || btn == 39) { return false; }; var me=this.normalGrid; if (me && me.editingPlugin) { if (!me.editingPlugin.editing) { me.editingPlugin.startEditByPosition(me.getSelectionModel().getCurrentPosition()); me.editingPlugin.getActiveEditor().field.selectText(); } } } A similar question: http://forums.unigui.com/index.php?/topic/7623-questions-about-unistringgrid/&do=findComment&comment=38965 Best regards, Quote
Sherzod Posted June 20, 2017 Author Posted June 20, 2017 >>2. After editing (when you press enter), go directly to the next cell Can you try this approach for now ?!: http://forums.unigui.com/index.php?/topic/4333-unidbgrid-and-enter-key/&do=findComment&comment=22039 Quote
Abaksoft Posted June 21, 2017 Posted June 21, 2017 Thank you DD, If I do not abuse too much of your kindness, is it possible to jump to the Cell down (same Col and row +1) not to the Right ? function reconfigure(sender, store, columns, oldStore, oldColumns, 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; <---- Here e.VK_DOWN (40) ???? return e.keyCode; } }) } } } I looked at sencha JS to find something like e.KeyCode = e.DOWN but I did'nt find. Quote
Sherzod Posted June 21, 2017 Author Posted June 21, 2017 Hi, If I do not abuse too much of your kindness, is it possible to jump to the Cell down (same Col and row +1) not to the Right ? OK, Np Can you try this approach for now ?!: UniStringGrid1 -> ClientEvents -> ExtEvents -> function reconfigure: function reconfigure(sender, store, columns, oldStore, oldColumns, 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); } } }) } } } http://forums.unigui.com/index.php?/topic/6389-skip-to-the-next-line-in-a-unidbgrid/&do=findComment&comment=32630 Also you can try this approach too: http://forums.unigui.com/index.php?/topic/6389-skip-to-the-next-line-in-a-unidbgrid/&do=findComment&comment=32772 Best regards, 1 Quote
zanona Posted September 26, 2017 Posted September 26, 2017 Do you have any examples using this plugin? I'm testing and it does not behave as described! Thansks Zanona Quote
Sherzod Posted September 26, 2017 Author Posted September 26, 2017 Hi, We need to check this plugin Quote
zanona Posted September 26, 2017 Posted September 26, 2017 I thought it was already functional! How can I check this plugin? Quote
Sherzod Posted September 26, 2017 Author Posted September 26, 2017 Have you include this plugin to your project? What problem do you have? 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.