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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...