01.
function
onSelectRoom(e) {
02.
03.
var
roomObjId = $(
"#ddlObjects"
).data(
"kendoDropDownList"
).dataItem();
04.
var
operator1 =
"eq"
;
05.
var
logic1 =
"or"
;
06.
var
scheduler = $(
"#scheduler"
).data(
"kendoScheduler"
);
07.
08.
if
(roomObjId.ObjectID < 1) {
09.
//Clear the filtering
10.
}
11.
var
selectedObj = [roomObjId.ObjectID];
12.
13.
var
filter = {
14.
logic: logic1,
15.
filters: $.map(selectedObj,
function
(value) {
16.
return
{
17.
operator: operator1,
18.
field:
"Id"
,
19.
value: value
20.
};
21.
})
22.
};
23.
24.
25.
26.
scheduler.dataSource.filter(filter);
27.
}
The code above works for filtering, however i need to clear the filtering if the objectID is < 0. Is there any method such as
scheduler.dataSource.clearFilter(); ?
Thanks.