I suggest you ...

DataSource's "read", "fetch", and "sync" methods should return a deferred

There has been many scenarios where I've needed to know when a DataSource finishes a "read" or "sync" operation.

I know there's the global "sync" event that I can bind to, but a lot of the time I only care about the result of one specific sync call. I can use the "one" method to only listen to it once, but this complicates things when I also care about errors. Since I need to register callbacks for both the "sync" and "error" events, and then unregister either one or the other, depending on which event fired.

It's even harder hooking into a "read" event because the DataSource doesn't expose one. I know I can hook into the "change" event of the DataSource, but I still have to guess whether the change event was fired because of read, or because of some other change.

If these methods returned a deferred it would be a lot easier to handle the circumstances where an app needs to do additional things after a "read" or "sync" is completed.

319 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Thomas MullalyThomas Mullaly shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    5 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • imaniman commented  ·   ·  Flag as inappropriate

        The absence of this feature , kill many times of our company. Especially when you are working with MVVM and there may be error or success and you should use `once` and `unbind`. Which in our case `unbind` did not unbind the listener attached to error or success event. Just for god add this capability in Q2 2014. Our company are tempting to leave kendo away.

      Feedback and Knowledge Base