Images on PanelBar inner levels

3 posts, 0 answers
  1. Marcelo
    Marcelo avatar
    2 posts
    Member since:
    Apr 2012

    Posted 18 Apr 2012 Link to this post

    Trying to put images on a 2 level Kendo PanelBar  get errors in visualization.
    This is my datasource :
      
    dataSource: [
            {   text: "Item 1" ,imageUrl : "img/usrmgr.gif",
                items: [
                    { text: "Sub Item 1.1" , valor: 2,imageUrl : "img/usrmgr.gif"},
                    { text: "Sub Item 1.2", valor : 3,imageUrl : "img/usrmgr.gif" }
                ]
            },
            { text: "Item 2", imageURL : "img/usrmgr.gif",
          items: [
                    { text: "Sub Item 2.1", valor : 5 ,imageUrl : "img/usrmgr.gif"},
                    { text: "Sub Item 2.2", valor : 5,imageUrl : "img/usrmgr.gif" },
                    { text: "Sub Item 2.3", valor : 5 ,imageUrl : "img/usrmgr.gif"},
                    { text: "Sub Item 2.4", valor : 5,imageUrl : "img/usrmgr.gif" },
                    { text: "Sub Item 2.5", valor : 5,imageUrl : "img/usrmgr.gif" }
                ]
           
      }
      ]


    is anything worng ??... Panelbar shows distinct hiearchies than loaded  in datasource.
    Thanks in advance,
    Marcelo
  2. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2877 posts

    Posted 20 Apr 2012 Link to this post

    Hello Marcelo,

    Your code snippet looks OK, except that there is a syntax mistake in the definition "Item2" object:
    { text: "Item 2", imageURL : "img/usrmgr.gif", //the correct is imageUrl

    You can check the modified example in this jsFiddle.
    I hope this information helps.

    All the best,
    Alexander Valchev
    the Telerik team
    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. Marcelo
    Marcelo avatar
    2 posts
    Member since:
    Apr 2012

    Posted 20 Apr 2012 Link to this post

    Thanks Alexander
Back to Top