Using "template" in databound panelbar

4 posts, 1 answers
  1. Kake
    Kake avatar
    14 posts
    Member since:
    Jan 2015

    Posted 19 Apr Link to this post

    Hi

    Is it possible to use templates in a databound panelbar?

    Pseudo:

    <ul kendo-panel-bar k-data-source="files.panelData.data()" k-rebind="files.panelData.data()">
        <span k-template>
            <i class="fa fa-folder-open" ng-hide="{{!dataItem.expanded}}"></i>
            <i class="fa fa-folder" ng-hide="{{dataItem.expanded}}"></i>
            {{dataItem.text}} <span ng-show="dataItem.count!= 0">({{dataItem.count}})</span>
        </span>
    </ul>

    (gives --> k-template without a matching parent widget found. It can be one of the following: ?^^kendoTreeMap, ?^^kendoMobileListView, ?^^kendoMobileScrollView, ?^^kendoListView, ?^^kendoTreeView )

     

     

     

     

  2. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 21 Apr Link to this post

    Hello,

    I am afraid that this functionality is currently not supported and the PanelBar widget cannot use templates for rendering when in dataBound mode. 

    All the configuration options are listed here:

    http://docs.telerik.com/kendo-ui/api/javascript/ui/panelbar

    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. Kake
    Kake avatar
    14 posts
    Member since:
    Jan 2015

    Posted 25 Apr in reply to Kiril Nikolov Link to this post

    Tnx for the reply.
    Trying to find a workaround that will work in my case... 
    Each of the panelbar items consist of a name and a count. (Could probably do some string parsing magic and update the count, but not an ideal solution)

    Is there some other way to solve this? Have a function as the text property etc...(I have a property on the databound json containing the count property.)
  5. Answer
    Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 26 Apr Link to this post

    Hi,


    As I said this is not supported as a built-in feature and we do not have a viable workaround for this scenario. You can submit a feature request in our Feedback portal, so we can consider it for a future release.

    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