search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

How to be able to select a row and also have double click working?

Asked by Naomi
4 years ago.

Hi,

I tried making both click and double click to work for the row, but I was unable to. Is it possible to have both working? If yes, would you please show an example?

Thanks in advance.

Answer posted by Dan Letecky [DayPilot]
4 years ago.

The row double click is not enabled by default. If you enable it using rowDoubleClickHandling = "Enabled" you'll be able to use both single and double click event handlers:

https://api.daypilot.org/daypilot-scheduler-rowdoubleclickhandling/

Just note that if the double click is enabled there will be a delay of 300 ms (https://api.daypilot.org/daypilot-scheduler-doubleclicktimeout/) before the single click event handler is fired.

Comment posted by Naomi
4 years ago.

I have double click working fine for me, but I would like both (e.g. single click selects the row) and the double click executing some action. I'll re-try today, but if you can make a working sample of having both working, that would be great.

Comment posted by Dan Letecky [DayPilot]
4 years ago.

This seems to work fine:

dp.rowClickHandling = "Select";
dp.rowDoubleClickHandling = "Enabled";
dp.onRowDoubleClick = function(args) {
  alert("double clicked");
};

Please let me know if it doesn't work as expected.

Comment posted by Naomi
4 years ago.

You're right, it does seem to work fine (not sure what did I wrong originally in my tests). Wondering if there are some properties associated with the selected row I can use (say, selectedIndex or something along the lines)?

Also, I will need to research how to make this highlight light blue.

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.