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

Shouldn't dataSource return promise for page() as well

1 Answer 145 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Marcin
Top achievements
Rank 1
Veteran
Marcin asked on 07 Jul 2017, 12:19 PM

When server paging is enabled, there is no easy way to find out when request ended after changing page from code. by dataSource.page(2). the page method does not return promise.

 

Best Regards

Marcin

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 11 Jul 2017, 07:04 AM
Hello Marcin,

Currently, the page method returns only a number as observed.

I can suggest submitting a feature request and based on its popularity we may implement it in a future release:

http://kendoui-feedback.telerik.com/forums/127393-kendo-ui-feedback/category/63716-data-source.

Currently, the desired result can be achieved with a custom flag and the requestEnd event of the dataSource. When the method is called the flag should be changed, and in the requestEnd event a check has to be made if the flag is set to determine if the event is fired after a page change:

http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#events-requestEnd

Regards,
Stefan
Progress Telerik
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.
Tags
Data Source
Asked by
Marcin
Top achievements
Rank 1
Veteran
Answers by
Stefan
Telerik team
Share this question
or