The issue with handling both events is that the OnClientNodeClicked event occurs before the OnClientDoubleClick. The only way I can you handling this issue would be to delay the code being executed in the OnClientNodeClicked event and then stopping the code from executing in the OnClientDoubleClick event (if it occurs). So something like this:
vardelayedClickEvent;
functionOnClientNodeClicked(sender, args) {
// Store variables you need from event to be used in the delay click method
So in the OnClientNodeClicked event you create a timeout to perform the click event and hold a reference to the timeout. In the OnClientDoubleClick you clear the timeout, so the code doesn't execute, and perform any logic that needs to be done.
Just one addition - sometimes depending on the browser and the delay time, a single click will occur twice. To prevent that you can add the followin line in the OnClientNodeClicked event, before you set the timeout:
if (delayedClickEvent) clearTimeout(delayedClickEvent);
You can read more about the subject here.Kind regards,
Bozhidar
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now