Postback twice caused by dataSource.sync(); on slow connections

4 posts, 1 answers
  1. Jacob
    Jacob avatar
    45 posts
    Member since:
    Sep 2014

    Posted 17 Aug 2015 Link to this post

    Hi,

    Is it possible, that dataSource.sync(); causes a double postback if using a slow connection ?

    It looks like that the client postback twice if the server doesn't reply within e.g. 15 seconds.

    The code:

    var dataSource = $("#" + gridname).data("kendoGrid").dataSource;
    dataSource.sync();
    Is it something you have seen before - if not, then I guess I'll have to find it somewhere else in my code :-)

    Are there any good ways to prevent double postbacks using the kendo framework?

    Thanks.

     

  2. Answer
    Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 19 Aug 2015 Link to this post

    Hello Jacob,

    In general the sync() method of the dataSource will issue a single ajax call to your remote server to update the data. If the request fails, then the error event will be thrown and no retries will be made. Please examine your code if you something in the dataBound event or any other events of the grid, that might be causing the second request.

    Regards,
    Kiril Nikolov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Jacob
    Jacob avatar
    45 posts
    Member since:
    Sep 2014

    Posted 20 Aug 2015 in reply to Kiril Nikolov Link to this post

    Thanks,

    Just want to be sure - there could have been some known issues...

    /Peter

  5. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 20 Aug 2015 Link to this post

    Hello Jacob,

     

    You are welcome.

     

    In case something else comes up do not hesitate to contact us.

     

    Regards,
    Kiril Nikolov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
UI for ASP.NET MVC is VS 2017 Ready