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

Disable / enable save button on add / update ?

1 Answer 899 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Bjørn
Top achievements
Rank 1
Bjørn asked on 18 Aug 2016, 11:11 AM

 

I have a edit popup dialog in a grid which will save a project into a project table.

This operation can be lengthy, because some tables are copied in the same operation. Maybe 10 seconds..

 

The problem now is when i click the save button, nothing happens in the gui for 10 seconds. Then the dialog closes.

If the user clicks the button right after it has been clicked two events will trigger, resulting in a error.

 

So how can i disable the save button / display a spinner in the save button while the add / update operation is ongoing ?

And when the operation is done, enable the button and remove the spinner ?

If the execution fails then i want to enable the button and let the user try again..

 

Anyone ?

 

 

 

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 22 Aug 2016, 07:45 AM
Hi,

You can use the save event to show a loading indicator via the kendo.ui.progress method and disable the button. The dataSource error event can be used to hide the indicator and enable the button in case a server error occurs - example.

Regards,
Daniel
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
Tags
Grid
Asked by
Bjørn
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or