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

How to force a kendo modal to close, and force-reload the data source?

3 Answers 97 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Andrew asked on 22 Feb 2016, 08:18 PM

I'm having some issues with the scheduler that I am not able reproduce without the backend data source.

I would like to know how to force the kendoUI scheduler edit modal to close after a user hits "save". I already know how to force a reload of the dataSource, like so: 

scheduler.dataSource.read()

However I am not sure where to place this. 

Essentially I need to reproduce the default update behavior using jQuery after the scheduler throws an error. 

Any help is greatly appreciated. I understand its difficult to help me when I am unable to reproduce the errors I'm experiencing in a local environment, so I'll settle for a workaround.

 

3 Answers, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 24 Feb 2016, 08:50 AM
Hi,

Please note that the dataSource expects by default to receive the created / updated record back to the client side as described in this help article. If the record is not returned correctly the "error" event of the dataSource will be triggered and the edit form will be leaved open. In current case I would suggest to update the server side to return the expected response when creating / updating records and skip implementing solution for workarounding the "error" event.

Regards,
Vladimir Iliev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Andrew
Top achievements
Rank 1
answered on 25 Feb 2016, 04:41 PM
It is already coming back from the server as a JSON formatted array of updated entries.
0
Vladimir Iliev
Telerik team
answered on 26 Feb 2016, 06:35 AM
Hello Andrew,

If this is the case than the "error" event should not be triggered. Also if you provide the current Scheduler configuration that you have as well as example server response for the "update" / "create" actions I would be happy to investigate the reason for current behavior. 

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