Get values from telerik multiselect in C# instead of javascript

2 posts, 0 answers
  1. Ric
    Ric avatar
    5 posts
    Member since:
    Sep 2015

    Posted 03 Sep 2015 Link to this post

    I have the following multi select from telerik on my mvc project
    <div class="demo-section user-selection">
        <h3 class="title">Select customers</h3>
          .Placeholder("No users selected")
          .Events(events => events.Change("TestFunc"))
          .DataSource(source =>
              source.Read(read =>
                  read.Action("GetCustomers", "Home");
                    //.HtmlAttributes(new { style = "width: 400px" })
        <div class=\"dropdown-header\">" +
            <span class=\"k-widget k-header\">Photo</span>" +
            <span class=\"k-widget k-header\">Contact info</span>" +
        <span class=\"k-state-default\">
            <img class=\"userPhoto\" src=\"" + Url.Content("") + "\" />
        </span>" +
        <span class=\"k-state-default\">
            <h3>#: data.givenName #</h3>
            <p>#: data.description #</p>
        <img class=\"tag-image\" src=\"" + Url.Content("") + "\" alt=\"\" />" +
                                      "#: data.givenName #")

    Everytime someone is selected i want to do some operations, right now im reading the selected with this javascript


    function TestFunc() {
    var multiselect = $("#customers").data("kendoMultiSelect");
    // get data items for the selected options.
    var dataItem = multiselect.dataItems();

    I would like to know how can i read it in my HomeController.cs instead.

  2. Kiril Nikolov
    Kiril Nikolov avatar
    2596 posts

    Posted 07 Sep 2015 Link to this post

    Hello Ric,


    Kendo UI is a exclusively a client side framework. Even though it offers the MVC wrappers, it runs on the client, therefore there are not server events or methods that you can use for this requirements. 


    Kiril Nikolov
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top