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

Progress during saveChanges

5 Answers 922 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Brian Roth
Top achievements
Rank 1
Brian Roth asked on 12 Apr 2012, 10:26 PM
I was able to add some javascript to cause the progress indicator to show during the grid save, but I was wondering if it would be possible to have this logic as standard built-in functionality for the grid?  Here's my code:

saveChanges: function (e) {
    // Turn on progress animation
    this._progress(true);
    var that = this;
    this.dataSource.one("change", function (e) {
        // Turn off progress animation
        that._progress(false);
    });

Thanks,
Brian

5 Answers, 1 is accepted

Sort by
0
Accepted
Alexander Valchev
Telerik team
answered on 17 Apr 2012, 01:18 PM
Hi Brian,

Currently such feature is not in our immediate plans. I would suggest to submit it in Kendo UI's UserVoice so other members of the community can discuss and evaluate it. If more people vote for it, we will consider such implementation for one of the future versions.

All the best,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Brian Roth
Top achievements
Rank 1
answered on 17 Apr 2012, 03:26 PM
Done.  Thanks for pointing me to the User Voice page.  I didn't even realize it was there!

Brian
0
Boris
Top achievements
Rank 1
answered on 02 Aug 2012, 10:25 PM
// load
kendo.ui.progress($("#grid"), true);

// hide
kendo.ui.progress($("#grid"), false);

0
Alison
Top achievements
Rank 1
answered on 02 Aug 2012, 10:43 PM
Brilliant, thanks Boris - I'd been searching for something similar and even made a forum post yesterday looking for something like this :).

I ended up with...
saveChanges: function (e) {
    setMessage("Saving changes... Please wait");
    this.dataSource.one("change", function (e) {
        setMessage("Update successful!");
    });
}

Regards, Alison
0
Dimitrij
Top achievements
Rank 1
answered on 30 Apr 2015, 01:24 PM

 

This one is a bit older, but perhaps my solution can help others...

I've written a custom function that I bind to the "save" event of the grid. It works with cell/inline and popup edit mode as well (in popup the loading indicator will be shown on the window overly):

function showLoadingIndicatorOnGridSave(e) {
    var grid = e.sender;
    var $window = $(".k-window");
    var loadingIndicatorTarget = ($window.length > 0 && $window.is(":visible"))
        ? $window
        : grid.wrapper;
 
    kendo.ui.progress(loadingIndicatorTarget, true);
    $(grid.dataSource).on("change", function () {
        kendo.ui.progress(loadingIndicatorTarget, false);
    });
}

 

HIH,
Dimitrij

Tags
Grid
Asked by
Brian Roth
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Brian Roth
Top achievements
Rank 1
Boris
Top achievements
Rank 1
Alison
Top achievements
Rank 1
Dimitrij
Top achievements
Rank 1
Share this question
or