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

Sequence of Events

3 Answers 239 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Pankaj
Top achievements
Rank 1
Pankaj asked on 28 Apr 2017, 07:53 AM

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

3 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 01 May 2017, 12:30 PM
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 (charts) and form elements.
0
Pankaj
Top achievements
Rank 1
answered on 11 May 2017, 05:31 AM

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

0
Stefan
Telerik team
answered on 12 May 2017, 12:09 PM
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 (charts) and form elements.
Tags
Grid
Asked by
Pankaj
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Pankaj
Top achievements
Rank 1
Share this question
or