Under Review
Last Updated: 12 Dec 2022 13:11 by ADMIN
Paul
Created on: 28 Nov 2022 19:06
Category: Kendo UI for jQuery
Type: Bug Report
0
Scheduler: Only dirty fields seem to be looked at in the SignalR update
One of my schedulers has an optional title field. The title is computed in these cases based on other properties on the event. An example could be an event that contains a “category” of “Break” and an employee of “Bob”. The title if empty might return “Break for Bob”. When we edit this event and choose a new category, the save works, and the new event coming in with the SignalR update contains the new “title” property as needed. But the event does not update in the DOM. It looks to be skipped somehow. This required a bunch of JavaScript to fix. Need to enumerate all events coming in the SignalR post, then enumerate all DOM elements for events in that scheduler, and manually update the DOM text for the event
3 comments
ADMIN
Veselin Tsvetanov
Posted on: 12 Dec 2022 13:11

Hi Paul,

Thank you for the additional explanation.

As you have correctly noted, the Scheduler will only update the dirty fields of its events. As a workaround for that limitation, you could perform a fake change of the title on the client, just before sending data to the server. That should mark the title field as dirty and should display the updated value when received from the server. Alternatively, you could also go on with the workaround you have already implemented.

Regards,
Veselin Tsvetanov
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.

Paul
Posted on: 05 Dec 2022 19:42

The processing happens at the server. And yes the title property is indeed in the schema of the scheduler.

The title is being sent as empty string from the client to the server. The server stores this empty string in the database. But the server generates a derived title "Break for Bob" (example) based on category/employee assigned and this is what is returned in the SignalR data.

So essentially the client says "Here's the new category and the title is blank". The server then throws a SignalR update where the title is filled in, but that update doesn't update the title field, only the category field. It's like only the fields that were dirty are updated.

I have a working JavaScript fix in as I mentioned so if you cannot reproduce I'll just leave it there.

ADMIN
Veselin Tsvetanov
Posted on: 05 Dec 2022 15:16

Hello Paul,

May I ask you to clarify if the computed title field is processed on the server, or on the client? If that has been done on the client and the Scheduler.dataSource.schema.model.fields does not have a definition for the title of the events, the Scheduler widget would not be able to determine that it needs to re-render the new computed title in its template.

I hope that the above answers to your question.

Regards,
Veselin Tsvetanov
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.