jaosobne Posted October 15, 2018 Share Posted October 15, 2018 Hi , I have this code on activecolumn to show roweditor and set focus to the first field . unisession.AddJS(Grid.JSName+'.getPlugin().startEdit('+Grid.CurrRow.ToString+',0); '); unisession.AddJS(Grid.JSName+'.getPlugin().editor.focus();') ; Row editor is shown but it doesn't set focus to the first field. If I execute second command with uniTimer then it gets focus . If I want to insert a new record on the first row then I must do it in 3 steps: 1, move to first record 2, timer event to insert record 3, and then timer event to send focus to the first field of roweditor Is there a easier way to execute scripts without timers ? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 15, 2018 Share Posted October 15, 2018 Hi, If I understand you correctly, ExtJS's focus( [selectText], [delay] ) method accepts defer (delay) as an argument, so you can try to use it Also you can try to use Ext.defer: Ext.defer(function(){ //... }, 500); //-> 500 ms Quote Link to comment Share on other sites More sharing options...
jaosobne Posted October 15, 2018 Author Share Posted October 15, 2018 Thank You, I'll try it. I found an issue for that i need to manualy send focus to the first field. When the grid is set to edit with uni_sencha theme then row editor doesn't gets focus . With other theme for example uni_win10 the row editor gets focus and work as it should. There is some bug in sencha theme .. 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.