Stemon63 Posted April 19, 2022 Share Posted April 19, 2022 Hi, on UniDBGrid: how to avoid executing the actionclick event on an actioncolumn type column when I press enter on the column? Or better, how to make a column not focusable? Non selectable when navigate with tabs or arrows? I cannot permits to press Enter on a "Delete" ActionColumn, but only click or double click. Thanks in advance Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 19, 2022 Share Posted April 19, 2022 2 hours ago, Stemon63 said: on UniDBGrid: how to avoid executing the actionclick event on an actioncolumn type column when I press enter on the column? Or better, how to make a column not focusable? Non selectable when navigate with tabs or arrows? I cannot permits to press Enter on a "Delete" ActionColumn, but only click or double click. Hello, You can try this approach: UniDBGrid -> ClientEvents -> ExtEvents -> function beforereconfigure(sender, store, columns, oldStore, oldColumns, eOpts) { columns.forEach(function(col) { if (col.xtype && col.xtype == "actioncolumn") { col.itemTabIndex = -1 } }); } 1 Quote Link to comment Share on other sites More sharing options...
bahry Posted May 17, 2022 Share Posted May 17, 2022 Hello @Sherzod Can't find this event. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 17, 2022 Share Posted May 17, 2022 5 minutes ago, bahry said: Can't find this event. Hello @bahry Which event? Which build are you using? Quote Link to comment Share on other sites More sharing options...
bahry Posted May 17, 2022 Share Posted May 17, 2022 1 hour ago, Sherzod said: Hello @bahry Which event? Which build are you using? beforereconfigure Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 17, 2022 Share Posted May 17, 2022 Which build? Try to use reconfigure event instead. Quote Link to comment Share on other sites More sharing options...
bahry Posted May 17, 2022 Share Posted May 17, 2022 11 minutes ago, Sherzod said: Which build? Try to use reconfigure event instead. uni-1.90.0.1556 Very Thanks, I will Try it Regards Quote Link to comment Share on other sites More sharing options...
Stemon63 Posted May 18, 2022 Author Share Posted May 18, 2022 Hi Sherzod, sorry but it don't works. Any hint? Thanks Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 18, 2022 Share Posted May 18, 2022 15 minutes ago, Stemon63 said: sorry but it don't works. Hi, Please clarify what is not working? On 4/19/2022 at 11:54 PM, Sherzod said: You can try this approach: UniDBGrid -> ClientEvents -> ExtEvents -> function beforereconfigure(sender, store, columns, oldStore, oldColumns, eOpts) { columns.forEach(function(col) { if (col.xtype && col.xtype == "actioncolumn") { col.itemTabIndex = -1 } }); } Works for me. Please specify which build are you using? And otherwise make a simple testcase to check. Quote Link to comment Share on other sites More sharing options...
bahry Posted June 22, 2022 Share Posted June 22, 2022 Hello @Sherzod I tried to make the same function to the WidgetColumn but it didn't work function beforereconfigure(sender, store, columns, oldStore, oldColumns, eOpts) { columns.forEach(function(col) { if (col.xtype && col.xtype == "widgetcolumn") { col.itemTabIndex = -1 } }); } Any Idea how to make it Regards Bahry Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 22, 2022 Share Posted June 22, 2022 Hello @bahry Can you please specify, which build of UniGUI are you using? Make a simple testcase if possible. Quote Link to comment Share on other sites More sharing options...
bahry Posted June 22, 2022 Share Posted June 22, 2022 10 minutes ago, Sherzod said: Hello @bahry Can you please specify, which build of UniGUI are you using? Make a simple testcase if possible. Build uni-1.90.0.1556, but can the above function works with WidgetColumn Thanks Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 22, 2022 Share Posted June 22, 2022 13 minutes ago, bahry said: with WidgetColumn This post may help you ? Quote Link to comment Share on other sites More sharing options...
bahry Posted June 22, 2022 Share Posted June 22, 2022 Thanks @Sherzod I need to disable the focus on Widget Fields, in the below image if the user press tab on the remarks field I need it to go to the next record not to the widget field. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 22, 2022 Share Posted June 22, 2022 8 minutes ago, bahry said: I need to disable the focus on Widget Fields UniButtonWidget? Quote Link to comment Share on other sites More sharing options...
bahry Posted June 22, 2022 Share Posted June 22, 2022 Just now, Sherzod said: UniButtonWidget? Yes Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 22, 2022 Share Posted June 22, 2022 I will try to check. Quote Link to comment Share on other sites More sharing options...
bahry Posted June 22, 2022 Share Posted June 22, 2022 Appreciate your help, Very Thanks Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 22, 2022 Share Posted June 22, 2022 Here, the focus is not on the button itself, but on the cell... Quote Link to comment Share on other sites More sharing options...
bahry Posted June 22, 2022 Share Posted June 22, 2022 even If I made the cell read only the focus will go to it Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 22, 2022 Share Posted June 22, 2022 42 minutes ago, bahry said: even If I made the cell read only the focus will go to it function select(sender, record, index, eOpts) { var widgetColIdx = 1; /*for example UniButtonWidget colIndex = 1*/ var grid = this.ownerGrid; var colIdx = eOpts; var rowIdx = index; var incIdx = 1; /*for example Increment Column Index = 1*/ if (colIdx == widgetColIdx) { Ext.defer(function(){ grid.getNavigationModel().setPosition(rowIdx, colIdx+incIdx); grid.getSelectionModel().select({row: rowIdx, column: colIdx+incIdx}); grid.getSelectionModel().setCurrentPosition({row: rowIdx, column: colIdx+incIdx}); }, 10); } } Quote Link to comment Share on other sites More sharing options...
bahry Posted June 23, 2022 Share Posted June 23, 2022 Thank you @Sherzod unfortunately, it does not work Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 23, 2022 Share Posted June 23, 2022 13 minutes ago, bahry said: unfortunately, it does not work ? Quote Link to comment Share on other sites More sharing options...
bahry Posted June 23, 2022 Share Posted June 23, 2022 Hello @Sherzod Yes, It works, after I made some all UnVisible columns to visible. So I think I need to change this var widgetColIdx = 1; /*for example UniButtonWidget colIndex = 1*/ at run time, because the value of widgetColIdx will depend on visibility columns. So How Can I Change it at runtime. Regards Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 23, 2022 Share Posted June 23, 2022 4 minutes ago, bahry said: at run time, because the value of widgetColIdx will depend on visibility columns. Hello, Only one widget in the grid? 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.