toni Posted April 22, 2021 Share Posted April 22, 2021 How to know that you have clicked on dbgrid, in the space where there are no records Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 22, 2021 Share Posted April 22, 2021 3 hours ago, toni said: How to know that you have clicked on dbgrid, in the space where there are no records Hello, One possible solution, can you check? function afterrender(sender, eOpts) { sender.body.dom.addEventListener('click', function(e) { if (Ext.getCmp(e.target.id) && Ext.getCmp(e.target.id).hasCls('x-grid-view')) { ajaxRequest(sender, 'eaclick', []); } }); } Quote Link to comment Share on other sites More sharing options...
toni Posted April 23, 2021 Author Share Posted April 23, 2021 Thanks Sherzod, but now, in wihch event of DBGrid can I receive this? I need to do something when user click in this area Quote Link to comment Share on other sites More sharing options...
toni Posted April 23, 2021 Author Share Posted April 23, 2021 I response in ajaxevent, perfect it works fine Thanks 1 Quote Link to comment Share on other sites More sharing options...
toni Posted April 23, 2021 Author Share Posted April 23, 2021 To do the same with TuniListBox is possible? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 24, 2021 Share Posted April 24, 2021 On 4/23/2021 at 2:41 PM, toni said: To do the same with TuniListBox is possible? Hello, Try this: UniListBox -> ClientEvents -> ExtEvents -> function afterrender(sender, eOpts) { sender.getEl().dom.addEventListener('click', function(e) { if (e.target && e.target.classList[0] != 'x-boundlist-item') { ajaxRequest(sender, 'eaclick', []); } }); } 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.