Asiaapollo Posted February 16, 2013 Share Posted February 16, 2013 Development Environment:Windows 7 Pro - Traditional Chinese (HKSAR) LocaleDelphi XE3 Enterprise - 32/64 bitBrowser Chrome version: 26.0.1410.5 dev-m uniGUI version: 0.91.0.982 I've added below code in uniForm.OnCreate event to start edit when user press any key: (this works well with uniGUI version: 0.90, but it will not correct display edited content <Enter> been pressed) with UniDBGrid1 do ClientEvents.ExtEvents.add( 'OnKeypress=function OnKeypress(e)'#13#10+ '{ var me = '+JSName+','#13#10+ ' pos = me.getSelectionModel().getCurrentPosition(),'#13#10+ ' chrCode = e.getCharCode(),'#13#10+ ' record = me.store.getAt(pos.row),'#13#10+ ' colname= me.columns[pos.column].dataIndex,'#13#10+ ' xplugin = me.getPlugin("uniCellEditor"),'#13#10+ ' char = String.fromCharCode(chrCode);'#13#10+ ' record.beginEdit();'#13#10+ ' record.set(colname, char);'#13#10+ ' xplugin.startEditByPosition(pos);}'); Steps to reproduce (please refer to attached 4 screen shots): 1. Select a cell 2. Press 'ABCD' 3. Press <Enter>, the just edited content ("ABCD") disappeared 4. Press arrow down key or use mouse to click to another row, the just edited content ("ABCD") show up again! Test case: Windowless_XE2.zip Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted February 16, 2013 Administrators Share Posted February 16, 2013 It is not a bug. There can be any combination of custom JS code in Ext JS events and any sort of malfunction in such user customizations is not a unigui bug. i.e. the bug is in JS script not uniGUI itself. I move the topic to General forum. Quote Link to comment Share on other sites More sharing options...
Asiaapollo Posted February 16, 2013 Author Share Posted February 16, 2013 But this works well with version 0.90. Is there any changes in Ext JS runtime lib? Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted February 16, 2013 Administrators Share Posted February 16, 2013 But this works well with version 0.90. Is there any changes in Ext JS runtime lib? Many things have changed in uniDBGrid since 0.90.0. Not in the Ext JS itself but the way uniGUI uses it. Quote Link to comment Share on other sites More sharing options...
Asiaapollo Posted February 18, 2013 Author Share Posted February 18, 2013 Hi Farshad, I guess you'd changed the cell(field) refreshing mechanism cause this issue, and row refreshing mechanism also been changed which caused the focus been lost after row changed by up/down key as my another post in bug report topic. 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.