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

Show Progress bar or disable save button on batch update

1 Answer 394 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Arun Kumar
Top achievements
Rank 2
Arun Kumar asked on 13 Jan 2013, 11:47 AM
I want to show progress bar or disable save button in the toolbar while batch update. How do I do that ?
I am using KendoUI MVC grid.

1 Answer, 1 is accepted

Sort by
0
Accepted
Vladimir Iliev
Telerik team
answered on 15 Jan 2013, 03:36 PM
Hi Arun,

 
Basically you can use the SaveChanges event of the Grid to start the progress animation and stop it when the Sync event of the DataSource is fired (after all request are complete) which will disable all buttons on the grid. Please check the example below:

@(Html.Kendo().Grid<Kendo.Mvc.Examples.Models.ProductViewModel>()
    .Name("Grid")
    ...
    .Events(e => e.SaveChanges("onSaveChanges"))
    .DataSource(dataSource => dataSource
        .Ajax()
        .Batch(false)
        .ServerOperation(false)
        .Events(events => {
            events.Sync("onSync");
        })

function onSync(e) {
    kendo.ui.progress($("#Grid"), false);
}
 
function onSaveChanges(e) {
    kendo.ui.progress($("#Grid"), true);
}
Kind Regards,
Vladimir Iliev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Arun Kumar
Top achievements
Rank 2
Answers by
Vladimir Iliev
Telerik team
Share this question
or