MultiSelectFor with checkbox

2 posts, 0 answers
  1. Rainer
    Rainer avatar
    1 posts
    Member since:
    May 2014

    Posted 19 May 2016 Link to this post

    Hi, i found an example of a Multiselect with checkbox on item templatem unfortunately only with UI syntax  and tried to use that in

    MultiSelectFor in MVC but struggle with the item template. Can somebody help me please ?

    Knowlege Article from UI


    Here is my code for the editor template

     Html.Kendo().MultiSelectFor(m => m)
            .ItemTemplate("<input type='checkbox'/> #:data.text#")


  2. Georgi Krustev
    Georgi Krustev avatar
    3725 posts

    Posted 23 May 2016 Link to this post

    Hello Rainer,

    The ItemTemplate tries to render "text" property, which I believe is not present in this case. You will need to render the DataTextField instead:
    .ItemTemplate("<input type='checkbox'/> #:data.Value#")

    Georgi Krustev
    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