PregressBar and Ajax posts

2 posts, 0 answers
  1. Dev Team
    Dev Team avatar
    10 posts
    Member since:
    Jun 2013

    Posted 11 Dec 2013 Link to this post

    I need to run some batch ajax posts and would like to use the new porgressbar to show the progress.
    I'm trying to use the Kendo Window to display the progressbar. The post happens when user clicks on my kendo grid checkbox.
    The issue I'm having is that the window only shows after the post is completed.

    Here is my window code:

     <% Html.Kendo().Window()
        .Title("Processing ...")
        .Content(() => {
                <div class="loading">
                    <%= Html.Kendo().ProgressBar()
                    .Events(e => e.Complete("onTotalComplete"))
                <div class="loadingInfo">
                    <h2>Loading styles</h2>
                    <div class="statusContainer">
                            Loaded: <span class="loadingStatus">0%</span>
                            <br />
                            Item <span class="chunkStatus">1</span> of 4

    Here is my checkbox click event:

    function onClick() {
                $.ajaxSetup({ async: false });

             $.post("<%= Url.Action("AddToCatalog", "Settings")%>?CatalogID=" + <%= Model.CatalogID %> + "&ManufacturerID=" + id + "&time=" + new Date().getTime(), function (data, status) {
                        if (data != "True" || status != "success") { alert("Error trying to update. Please try again.");; };
               var total = $("#totalProgressBar").data("kendoProgressBar");
               total.value(total.value() + 1);

                $.ajaxSetup({ async: true });

    Any clue how to make this an efficient sync process?

  2. Dimiter Madjarov
    Dimiter Madjarov avatar
    2255 posts

    Posted 12 Dec 2013 Link to this post

    Hello Javier,

    When the async option of the jQuery ajax method is set to false, the UI thread is blocked. I assume that this is the reason why the window widget is not opened.

    For additional information I would suggest you to take a look at the the following topic.

    I wish you a great day!

    Dimiter Madjarov
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top