Kendo Scheduler Agenda - Change event is selecting incorrect event when using group with resources

2 Answers 75 Views
Scheduler
Hilton Pereira
Top achievements
Rank 1
Hilton Pereira asked on 12 Oct 2022, 01:11 AM | edited on 14 Oct 2022, 02:29 PM

I had implemented this example: https://dojo.telerik.com/omIxeDUx

 

When I'm using kendo scheduler with view "Agenda", I need to separate events on same date by group, so I'm using the resources + group option.

With that said, I'm having problem when I need to get the selected event on change event trigger. But for some reason, depending on which event's row you select, the e.events[0] attribute is returning another event, which is not the selected one.

 

I'm trying to find what I'm doing wrong, the example alerts to window the meetingID of e.events[0] when change event triggers. If you see by the description of event, the ID is different.

 

Can anyone help me with this problem?

EDIT:

If you are experiencing the same problem, here is a workaround.  I'd notice that I can get the selected item by the UID of the selected row, and just ignore the e.events. Here is the following implementation: https://dojo.telerik.com/omIxeDUx/7 (notice that depending on the version you using, the "class" of selected item may be "k-state-selected" instead of "k-selected")


change: function (e) {
    var selected = document.querySelector(".k-scheduler-content tr.k-selected");
    if (selected) {
        var data = $(selected).find("[data-uid]").data();
        var selectedItem = this.dataSource.getByUid(data.uid);
        alert("Kendo event: " + e.events[0].meetingID + "\nSelected event: " + selectedItem.meetingID);
    }
}

 

 

Best regards,

Hilton Pereira
Top achievements
Rank 1
commented on 12 Oct 2022, 02:20 PM

I updated the dojo to force start date to be 2022-10-11: https://dojo.telerik.com/omIxeDUx/3

2 Answers, 1 is accepted

Sort by
0
Accepted
Neli
Telerik team
answered on 19 Oct 2022, 07:36 AM

Hi,

Thank you very much for reporting the issue and for suggested workaround.

Based on your report I logged a new bug in our official Feedback Portal. Below you will find a link to the item.

https://feedback.telerik.com/kendo-jquery-ui/1583939-wrong-event-is-returned-in-the-change-event-in-agenda-view-in-scheduler-with-date-grouping

As a small token of gratitude for reporting a bug I have updated your Telerik points.

Regards,
Neli
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

1
Neli
Telerik team
answered on 14 Oct 2022, 01:55 PM

Hi,

I will need a little bit more time to investigate the issue. I will come back to you with more infromation on the matter next week. 

Thank you very much for your patience.

Regards,
Neli
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Hilton Pereira
Top achievements
Rank 1
commented on 14 Oct 2022, 02:26 PM

Thank you for the answer, by the way I'm working on a workaround for this issue. I will update the question with this workaround
Tags
Scheduler
Asked by
Hilton Pereira
Top achievements
Rank 1
Answers by
Neli
Telerik team
Share this question
or