This is a migrated thread and some comments may be shown as answers.

Scheduler Right Click Slot Selection

3 Answers 686 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Kenneth
Top achievements
Rank 1
Kenneth asked on 17 Mar 2017, 10:42 PM

I would like to have an event-less slot be selected when I right click on the slot. Currently, I am able to do this with events by accessing the UID and using the select() method. But an event-less slot does not have a UID that I can access when the slot is not selected, from what it seems. So, the closest that I have been able to get to selecting a slot is by using the start and end date. However, this always selects the slot in the top row of the grid, rather than the slot that I right clicked. I have seen an example of scrolling to a slot based on the row and column position, but I do not think that this selects the slot. I also do not think that the select() method accepts the row and column indices as parameters. 

Is there a method or some functionality that I can use to perform this?

3 Answers, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 21 Mar 2017, 12:27 PM

Hello Kenneth,

You can get the empty slot by using either slotByPosition or slotByElement methods.

Therefore, you can handle a click event and either use the position from the event arguments or the target element.  

Regards,
Ianko
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Kenneth
Top achievements
Rank 1
answered on 21 Mar 2017, 12:35 PM

Hi Ianko, 

Thanks for the response. I have done this, but it always matches and selects the slot in the first row with that position(the first row), rather than the row that I have right-clicked. Is there a way to target the specific row that I have clicked on as well, in the select? 

Thanks, 

Ken

0
Ianko
Telerik team
answered on 21 Mar 2017, 01:08 PM

Hello Kenneth,

There are some solutions and hints about the same case in this forum thread: http://www.telerik.com/forums/select-a-slot-by-right-click. You can check if the code examples there can help you with the case.

Regards,
Ianko
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Scheduler
Asked by
Kenneth
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Kenneth
Top achievements
Rank 1
Share this question
or