Jump to content

Prevent doubleclick on dbgrid header


Mike

Recommended Posts

Hi,

 

My application is using an Ajax Event (dblClick). When double clicked on a row it will show a detail form.

 

However when by accident double clicked on the header it shows also a detail form.

 

How can this be prevented?

Link to comment
Share on other sites

Better you should use OnDblClick event

 

 

ExtEvents dblclick -> ajaxRequest(sender, '_dblClick', [])

 

In this case you can try this:

function afterrender(sender, eOpts)
{
    if (sender.headerCt) {
        sender.headerCt.el.on('dblclick', function(e) {
            e.stopEvent();
        });
    }
}
Link to comment
Share on other sites

 @Pedrisco: it is interfering with onclick so I don't want to use it.

function afterrender(sender, eOpts)
{
    if (sender.headerCt) {
        sender.headerCt.el.on('dblclick', function(e) {
            e.stopEvent();
        });
    }
}

 

@P

That works! Thank you!

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...