values returned from event handlers

3 posts, 0 answers
  1. Dr.YSG
    Dr.YSG avatar
    210 posts
    Member since:
    Dec 2009

    Posted 18 Apr 2012 Link to this post

    I have a change event hander for my datasource

    change: function (e) {

    Right now, if the newData exits normally, without hitting the return statement, then all works fine. But if i uncomment the last line in the listing below (which returns nothing) then the datasource is not updated in the Grid that is mapping it. I have tried returning true, false, this and e, but nothing works:

    What is an event handler supposed to return (documentation needs to be filled, as well as what the value of e is supposed to be).

    btw searchData below is that handle for the datasource

    function newData(e) {
        chartData.series = [];
        chartData.names = [];
        var groups = searchData.view();
        var groupCnt = groups.length;
        var group;
    //    if (groupCnt == return; // nothing grouped, no meaningful chart can be created.
  2. Rosen
    Rosen avatar
    3247 posts

    Posted 23 Apr 2012 Link to this post


    I'm afraid that the provided information is not sufficient in order to track the cause for the described behavior. Therefore, you should provide a jsFiddle page in which this issue can be observed locally. Also note that event handlers does not need to return anything.

    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Dr.YSG
    Dr.YSG avatar
    210 posts
    Member since:
    Dec 2009

    Posted 23 Apr 2012 Link to this post

    I'm sorry. I am only able to reproduce this error with remote data. And that remote data cannot be exposed in a JsFiddle. When I tried it with local data I did not have the problem.

    By restructuring my code so that I did not have to have an explicit "return" in the change  event handler, I no longer have this problem.

    So I guess we have to close this thread. But thank you for your attention to this matter. I appreciate it.

Back to Top