Completed
Last Updated: 13 Mar 2020 09:02 by ADMIN
Robert
Created on: 13 Feb 2015 16:56
Category: Grid
Type: Feature Request
7
Implement JQuery Promises on async methods
It would be really great if Kendo implemented JQuery Promises on all methods that are fired asynchronously. There are several places where there would be direct and tangible benefits:

1) DataSource: Methods like fetch() and read() would be able to chained with .then(), .fail(), and .always() in order to complete certain operations after these methods have completed, but before events are fired up the chain.

2) UI controls like Grid: calling KendoGrid.saveChanges() would allow you to chain a .then() function to the end, so that a particular function can be called only when a particular instance of saveChanges completes, not every time the requestEnd event is fired on the DataSource.
3 comments
ADMIN
Angel Petrov
Posted on: 13 Mar 2020 08:59

Hi,

The second point is not clearly described on how it should look. For the datails problem mentioned in is related to the implementation, as one can place anything in the detail template. If you have only html you can directly use the grid event however if the is a child grid which loads data one should subscribe to its datasource events or its dataBound event if you want to know when it is populated. That said it is specific to the implementation. 

For the save changes one can directly use the datasource events(for example sync should do the work here).

Regards,
Angel Petrov
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tim
Posted on: 21 Oct 2015 12:05
Point 2 is very important for us right now. We need to call grid.expandRow and then do something with the expanded details after the async operation is done. We don't need to do this every time, so we can't use DetailExpanded or something similar.

Same goes for grid.saveChanges. We have a button that should save and then load another page. This doesn't work currently, as the new page will load while the async operation is still running, causing no request to be sent.

I'd say this is a fairly important feature.
ADMIN
Telerik Admin
Posted on: 16 Feb 2015 11:49
Thanks for the suggestion, Robert.

I believe the first part regarding the KUI data source is already supported, see this thread: http://kendoui-feedback.telerik.com/forums/127393-telerik-kendo-ui-feedback/suggestions/4321731-datasource-s-read-fetch-and-sync-methods-s