Pending Review
Last Updated: 09 Sep 2019 11:36 by ADMIN
Tom
Created on: 06 Sep 2019 15:04
Category: Scheduler
Type: Feature Request
1
Intercept SignalR real-time event

This is in regards to my previous ticket #1426737. Your suggested solution did not work on closer look. The problem is that the event is turned off completely instead of only for a specific event.

Let me give you a practical example: I have a separate filter for the scheduler that allows me to look at the events for a specific resource. If someone else on a different computer now adds an event that is assigned to a different resource, it still shows up on my calendar. I want to suppress that event if it doesn't match the resource I selected in the filter. Using the taskHub.off('create') turns off the 'create' event completely (at least until the user refreshes the page). That way, new tasks added by someone for the selected resource won't show up.

I would like to subscribe to the events like this:

taskHub.client.update = onScheduleUpdate;

taskHub.client.create = onScheduleCreate;

And then in the function check if the filter applies to the task and if not, suppress it. I tried the 'preventDefault' method, but that also turns off the event completely.

functiononScheduleCreate(e) {

if(e.AssignedResource != filter.AssignedResource)

      e.preventDefault(); -- does not work, turns off this event completely

}

This is not an untypical requirement for a calendar, especially if there are hundreds of tasks and filtering is the only option to organize them in a legible way.

There has to be a way to achieve this, but I have spent already way too much time on this. I need your help.

Thanks. 

1 comment
ADMIN
Ivan Danchev
Posted on: 09 Sep 2019 11:36

Hello Tom,

The Scheduler does not have a built-in mechanism to handle the described SignalR scenario and we were unable to come up with a possible workaround. Converting this thread to public feature request as it would be worth it to consider possible implementations that would allow event creation to be prevented in such scenarios that involve resources filtering.

We will monitor the community's interest in this request and consider including it in our roadmap accordingly.

Regards,
Ivan Danchev
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.