how to send GridSelectionMode.Multiple to the server

2 posts, 0 answers
  1. Maurice
    Maurice avatar
    24 posts
    Member since:
    Jan 2016

    Posted 02 Sep 2016 Link to this post


    I have a page with a grid with .Selectable(s => s.Type(GridSelectionType.Row).Mode(GridSelectionMode.Multiple)) and can select multiple lines. And I have a DropDownList.

    What I want is to send an array of selected lines in the grid to the server AND the information of the dropdownlist.

    If I want only one of this information I know how to do it but somewhere my ajax call gets corrupted.

    If I have the following:

    var items= {};
                var grid = $('#grid').data('kendoGrid');
                var selectedElements =;
                for (var j = 0; j < selectedElements.length; j++) {
                    var item = grid.dataItem(selectedElements[j]);
                    items['projectMoveModels[' + j + '].ID'] = item.ID;
                    items['projectMoveModels[' + j + '].DateString'] = item.Date;
                    items['projectMoveModels[' + j + '].EmployeeID'] = item.EmployeeID;
                    items['projectMoveModels[' + j + '].Hours'] = item.Hours;
                    type: "POST",
                    data: items,
                    url: '@Url.Action("Move", "Project")',

    And in the controller

    public ActionResult Move(IList<ProjectMoveModel> projectMoveModels)

    I do receive all selected lines in projectMoveModels.


    But I want more data so I changed it to

    var type = 1; //info from the dropdownlist
                    type: "POST",
                    data: { projectMoveModels: items, type: type },

    with in the controller

    public ActionResult Move(IList<ProjectMoveModel> projectMoveModels, object type)


    Now projectMoveModels will became null


    How can I fix this error?


    Thanks in advance


  2. Konstantin Dikov
    Konstantin Dikov avatar
    2466 posts

    Posted 06 Sep 2016 Link to this post

    Hello Maurice,

    You could take a look at the following forum threads that should help you achieve the desired result:
    Hope this helps.

    Konstantin Dikov
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top