Disable / enable save button on add / update ?

2 posts, 0 answers
  1. Bjørn
    Bjørn avatar
    1 posts
    Member since:
    Mar 2016

    Posted 18 Aug Link to this post

     

    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 ?

     

     

     

  2. Daniel
    Admin
    Daniel avatar
    2118 posts

    Posted 22 Aug Link to this post

    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.
     
  3. Kendo UI is VS 2017 Ready
Back to Top