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

Kendo UI scheduler - right click on cells deselects selection

2 Answers 156 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Pawel
Top achievements
Rank 1
Pawel asked on 13 Mar 2014, 11:49 AM
Hi!
I have the problem mentioned above. I want to create a little context menu on scheduler when clicking on selected cells. The problem is than when i rightclick selected cells, it selects only one cell that was clicked and deselects the other ones. Is there a solution for that ?
Regards

2 Answers, 1 is accepted

Sort by
0
Pawel
Top achievements
Rank 1
answered on 13 Mar 2014, 03:07 PM
Hi
I am trying to fix this problem and I have one question.
When I select cells on the schedule grid there is event object available, which have slots property. 

Doing this:

01.change: function (event) {
02.        console.log('slots outside',event.slots);
03.        var onMouseDown = function(e) {
04.            e.preventDefault();
05.            e.stopPropagation();
06.            console.log('slots inside', event.slots);
07.        }
08.        if(!$scope.scheduler.bound) {
09.            $('.k-scheduler-table').on('mousedown', '.k-state-selected', onMouseDown);
10.        }
11.}

I have found that slots.inside and slots.outside are other objects so my conclusion is that every grid select is creating new object. What obout the memory? Is kendo UI cleaning that or if i select grid 1000 times I would have 1000 objects?


0
Georgi Krustev
Telerik team
answered on 17 Mar 2014, 09:38 AM
Hello Paweł,

Thank you for drawing our attention to this issue. We will address it in the next official release due in the mid if this week. I updated your Telerik because of the involvement.

With regards to your second question, the only reason for the difference between "inside" and "outside" slots should be a new selection performed after the event has been triggered. I suppose that the mousedown event is wired after widget's one, which means that it will be triggered before yours. I would suggest you wait for the fix, which will be included in the upcoming release.

Regarding memory management, JavaScript has such management responsible for memory allocation and etc.

Regards,
Georgi Krustev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Data Source
Asked by
Pawel
Top achievements
Rank 1
Answers by
Pawel
Top achievements
Rank 1
Georgi Krustev
Telerik team
Share this question
or