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

2 posts, 0 answers
  1. Marcin
    Marcin avatar
    170 posts
    Member since:
    Jan 2011

    Posted 07 Jul Link to this post

    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

  2. Stefan
    Admin
    Stefan avatar
    1147 posts

    Posted 11 Jul Link to this post

    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.
Back to Top