Here is a quick update of what I have done.
In my datasource, I have referenced a JavaScript function 'filterSchedule'.
.DataSource(d => d
.Model(m =>
{
m.Id(f => f.ID);
m.Field(f => f.Title);
})
.Read(read => read.Action(
"Read"
,
"Scheduler"
).Data(
"filterSchedule"
))
.Create(
"Create"
,
"Scheduler"
)
.Destroy(
"Destroy"
,
"Scheduler"
)
.Update(
"Update"
,
"Scheduler"
)
)
Here is a bit of javascript where I read the two input boxes I have. I also needed some additional code to manually refresh both the page and the read data from the controller.
<script type=
"text/javascript"
>
function
filterSchedule() {
var
section = $(
"#sections"
).val();
var
rooms = $.map($(
"#room :selected"
),
function
(option) {
return
$(option).val();
});
return
{
Section: section,
Room: rooms
};
};
$(
"#sections"
).change(
function
() {
var
scheduler = $(
"#scheduler"
).data(
"kendoScheduler"
);
scheduler.dataSource.read();
scheduler.view(scheduler.view().name);
});
$(
"#room"
).change(
function
() {
var
scheduler = $(
"#scheduler"
).data(
"kendoScheduler"
);
scheduler.dataSource.read();
scheduler.view(scheduler.view().name);
});
</script>
This allows me to simply get these two objects in my controller like so:
public
virtual
JsonResult Read([DataSourceRequest] DataSourceRequest request, String Section, List<String> Room)
In this controller I will include the logic for checking if these values are null, etc..
Anyway, I hope this will help anyone in the future who wishes to update their calendar based on one or more input boxes.
Cheers,
Brandon