Sequence of Events

4 posts, 0 answers
  1. Pankaj
    Pankaj avatar
    2 posts
    Member since:
    Dec 2013

    Posted 28 Apr 2017 Link to this post

    Hi,
    I am using an HTML Button (Say Save) Outside Kendo Grid toolbar to save the data.
    On Button click I have called the JavaScript function and from JavaScript I am calling the saveChanges method that fires my events in controller.
    I have following four events written in controller.   
    Editing_Create, Editing_Update, Editing_Destroy and Save. The events are also getting fired.
    My question is if I add, update and delete some records from the grid and hit the Save Button, what is the sequence in which the above four controller action will get executed. Currently it is getting executed in any random order each time.

    Please advice.

    Regards,
    Mahendra

  2. Stefan
    Admin
    Stefan avatar
    3009 posts

    Posted 01 May 2017 Link to this post

    Hello Mahendra,

    In general, the Grid will send the requests in the following order:

    1) Create
    2) Update
    3) Destroy

    But the time they hit the action in the controller is different, as it may vary depending on the size of the request, the connection etc. The Kendo UI team has only control over the order in which they are sent.

    Regards,
    Stefan
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Pankaj
    Pankaj avatar
    2 posts
    Member since:
    Dec 2013

    Posted 11 May 2017 in reply to Stefan Link to this post

    Hi Stefan,

    Thanks for your reply.

    But it still does not solve my problem. What is the best way to achieve this. How Can I ensure my events in controller are in a sequence.

     

    Regards,

    Mahendra

  4. Stefan
    Admin
    Stefan avatar
    3009 posts

    Posted 12 May 2017 Link to this post

    Hello Pankaj,

    As mentioned this will depend on the size of the requests.

    We only have control over the order in which they are sent, the receiving order depends on how fast the request will hit the controller, and we have no control over this.

    Regards,
    Stefan
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top