Jump to content

Click in UniDBGrid


toni

Recommended Posts

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', []);
        }
    });
}

 

Link to comment
Share on other sites

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', []);
        }
    });
}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...