Listview multi select in HTML Wrapper

4 posts, 1 answers
  1. Shuja
    Shuja avatar
    30 posts
    Member since:
    Mar 2011

    Posted 21 Jan 2015 Link to this post

    Hi,

    Is there a way of setting the .Selectable() value in the Kendo Listview MVC wrapper to allow user to select multiple list items?

    Regards,

    Shuja
  2. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2564 posts

    Posted 23 Jan 2015 Link to this post

    Hello Shuja,

    You can use the "multiple" option. Its explained here:

    http://docs.telerik.com/kendo-ui/api/javascript/ui/listview#configuration-selectable

    Regards,
    Kiril Nikolov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. Shuja
    Shuja avatar
    30 posts
    Member since:
    Mar 2011

    Posted 23 Jan 2015 in reply to Kiril Nikolov Link to this post

    Hi,

    The "multiple" option does not work in the Listview HTML wrapper control.
    I am able to do the following:
    @(Html.Kendo().ListView<SystemsFormsMVC.Models.AccessLevelItems>()
    .Name("lstAccessLevel")
            //.Events(e => e.Change("onChange"))
    .AutoBind(false)
    .TagName("div")
    .ClientTemplateId("AccessLevelTemplate")
    .HtmlAttributes(new { style = "border:1px solid lightgrey;height:310px" })
    .Selectable()
    .Pageable()
    .DataSource(dataSource => dataSource
        .Sort(sort =>
        {
            // Sort by SystemName in descending order
            sort.Add(s => s.AccessItemCode).Ascending();
        })
        .PageSize(20)
        .Model(model =>
        {
            model.Id(s => s.AccessItemCode);
            model.Field(s => s.AccessItemDesc);
        })
        .Read(read => read
             .Action("GetAccessLevelItems", "Home")
             .Data("AccessItemFilter")
        )
        )
    )

    BUT the .Selectable() only allows a single selection. I've tried .Selectabe("multiple") but this errors.
    So how do i get multi-select in the listview using the HTML Wrapper control?

    regards,

    Shuja
  5. Answer
    Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2564 posts

    Posted 27 Jan 2015 Link to this post

    Hello Shuja,

    Please find the attached example that shows a working ListView with multiple selection enabled (you need to use ctrl+click for multiple selection)

    Regards,
    Kiril Nikolov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready