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,