How can I pass data from the client to the Read action for a MultiSelect using virtualization. Here is the declaration of the MultiSelect I'm using:
@(Html.Kendo().MultiSelectFor(model => model.SelectedProjectIds)
.Filter(FilterType.StartsWith)
.DataTextField("Name")
.DataValueField("Id")
.HtmlAttributes(new { style = "width: 100%" })
.Placeholder("- Select Project(s) -")
.DataSource(source =>
{
source.Custom()
.ServerFiltering(true)
.ServerPaging(true)
.PageSize(80)
.Type("aspnetmvc-ajax")
.Transport(transport =>
{
transport.Read("ProjectRead", "ProjectPlan");
})
.Schema(schema =>
{
schema.Data("Data")
.Total("Total");
});
})
.Virtual(v => v.ItemHeight(26))
)
I'd like to pass in some data in the Transport Read. Here is the action method for the Read:
[HttpPost]
public ActionResult ProjectRead([DataSourceRequest] DataSourceRequest request)
{
return Json((GetProjects() as List<NamedEntity>).ToDataSourceResult(request));
}
So, in addition to the DataSourceRequest object, I'd like to pass in a string from the client-side. How can this be done?