Pass data to read action while using virtualization

2 posts, 1 answers
  1. Dave
    Dave avatar
    42 posts
    Member since:
    Jan 2008

    Posted 12 Dec 2018 Link to this post

    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)
        .HtmlAttributes(new { style = "width: 100%" })
        .Placeholder("- Select Project(s) -")
        .DataSource(source =>
                .Transport(transport =>
                    transport.Read("ProjectRead", "ProjectPlan");
                .Schema(schema =>
        .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:

            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?

  2. Answer
    Dimitar avatar
    807 posts

    Posted 14 Dec 2018 Link to this post

    Hello Dave,

    You could pass additional parameter along with the read request through the Data method:
    .Read(read => read.Action("ProjectRead", "ProjectPlan").Data("additionalData"))
      function additionalData(e) {
        return {
          myParam: "test"

    Then, the additional parameter can be received in a controller method with the following signature:
    public ActionResult ProjectRead([DataSourceRequest] DataSourceRequest request, string myParam) {

    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.

Back to Top