This is a migrated thread and some comments may be shown as answers.

Listview multi select in HTML Wrapper

3 Answers 441 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Shuja
Top achievements
Rank 1
Shuja asked on 21 Jan 2015, 05:47 PM
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

3 Answers, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 23 Jan 2015, 01:17 PM

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!
 
0
Shuja
Top achievements
Rank 1
answered on 23 Jan 2015, 01:59 PM
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
0
Accepted
Kiril Nikolov
Telerik team
answered on 27 Jan 2015, 09:10 AM

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!
 
Tags
ListView
Asked by
Shuja
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Shuja
Top achievements
Rank 1
Share this question
or