Using MultiSelect (Single Mode) attempting to create a .TagTemplate using maxTotal or currentTotal

2 posts, 0 answers
  1. Doug
    Doug avatar
    4 posts
    Member since:
    May 2015

    Posted 12 May 2016 Link to this post

    I'm looking to get the MultiSelect list to display something like "1 out of 15"  But when using the "maxTotal" found here tagTemplate, I get "maxTotal is not defined"


    1.<script type="text/x-kendo-template" id="selectedRoleTemplate">
    2.    #:data.length# out of #:maxTotal#
    4.<script type="text/javascript">
    5.    var selectedRoleTemplate = kendo.template($("#selectedRoleTemplate").html(), { useWithBlock: false });


    01.@(Html.Kendo().MultiSelectFor(m => m)
    02.      .AutoBind(true)
    03.      .AutoClose(false)
    04.      .DataValueField("RoleId")
    05.      .DataTextField("RoleName")
    06.      .TagMode(TagMode.Single)
    07.      .TagTemplate("#=selectedRoleTemplate()#")
    08.      .DataSource(dataSource =>
    09.      {
    10.          dataSource.Read(read => read.Action("UserRoleList", "Lov", new { userId = -9, isActiveOnly = false}))
    11.              .ServerFiltering(false);
    12.      }))





  2. Hristo Valyavicharski
    Hristo Valyavicharski avatar
    975 posts

    Posted 14 May 2016 Link to this post

    Hi Doug,

    Please look at this forum post:

    Does it help?

    Hristo Valyavicharski
    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