serverfiltering and parameterMap and navigate

2 posts, 0 answers
  1. Robert
    Robert avatar
    56 posts
    Member since:
    Sep 2011

    Posted 02 Aug Link to this post

    New to kendo ui in general and started working with scheduler. ASP.NET MVC application. Here is what i am trying to do:

    1. when user changes view or navigates (via today, fwd, or back buttons or the date picker itself) i want to call out to server to read new data (serverfiltering = true)

    2. when user "filters" on people whose tasks i am displaying, i only want it to filter "in place" so to speak (serverFiltering = false) and NOT call out to server again. e.g. i already have the data loaded that i need, i only need to hide/show it. I don't need to call server for it.

    it seems like i can only get one or the other. 

    has anybody dealt with this issue? I looked at telerik's server filtering example, but it calls out for everything. 

  2. Robert
    Robert avatar
    56 posts
    Member since:
    Sep 2011

    Posted 03 Aug in reply to Robert Link to this post

    i solved it. or apparently i think i solved it.  i just turn off server fioltering before i do the team member filtering. here is the code snippet

     $("#people :checkbox").change(function (e) {
                    var checked = $.map($("#people :checked"), function (checkbox) {
                        return parseInt($(checkbox).val());
                    });

                    var scheduler = $("#scheduler").data("kendoScheduler");
                    scheduler.dataSource.options.serverFiltering = false; 
                    scheduler.dataSource.filter({
                        operator: function (task) {
                            return $.inArray(task.ownerId, checked) >= 0;
                        }
                    });
                    scheduler.dataSource.options.serverFiltering = true;

                });

  3. Kendo UI is VS 2017 Ready
Back to Top