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

serverfiltering and parameterMap and navigate

1 Answer 175 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 03 Aug 2016, 01:17 AM

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. 

1 Answer, 1 is accepted

Sort by
0
Robert
Top achievements
Rank 1
answered on 03 Aug 2016, 01:09 PM

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;

            });

Tags
Scheduler
Asked by
Robert
Top achievements
Rank 1
Answers by
Robert
Top achievements
Rank 1
Share this question
or