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

4 posts, 0 answers
  1. Andrew
    Andrew avatar
    21 posts
    Member since:
    Dec 2015

    Posted 22 Feb Link to this post

    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.

     

  2. Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2172 posts

    Posted 24 Feb Link to this post

    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!
     
  3. Kendo UI is VS 2017 Ready
  4. Andrew
    Andrew avatar
    21 posts
    Member since:
    Dec 2015

    Posted 25 Feb in reply to Vladimir Iliev Link to this post

    It is already coming back from the server as a JSON formatted array of updated entries.
  5. Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2172 posts

    Posted 26 Feb Link to this post

    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!
     
Back to Top
Kendo UI is VS 2017 Ready