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

missing documentation for kendoUI "item"

2 Answers 34 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Bridge24
Top achievements
Rank 1
Iron
Bridge24 asked on 20 Jun 2019, 02:09 PM

Hi, we used Kendo for a while, and during all our experiences, we found that one thing is missing from all documentation: 

All the available properties of an "item", when we load a component from a dataSource.
The closest from a documentation I found is this one:
https://docs.telerik.com/kendo-ui/api/javascript/ui/menu/configuration/datasource

But, to get all available properties of item, we must read tons and tons of documentation, and guess them!

I am sure you have an official list of what this "item" should be?

This same item seems to be available in

  • menu + contextMenu
  • panelBar(accordion)
  • treeview
  • and more...

I think you should create 1 single page of documentation for how an "item" can be configured.
I may have almost all of them there, but I'm not sure: 

var sampleItem = {
    text: "<b>texte</b>",
    encoded: true, // default, allow htmlEncode of "text" property
    cssClass: "itemClass", // apply style to "text"
    // url: "http//xxx", //used to open link on click
    attr: { data_key1: "value1", data_key2: "value" }, //may be used on "select" event
    // content + contentAttr -- DO NOT USE :D
    content: "text", //ignore all templating, and set this raw text as subitem content.
    contentAttr: {
        style: 'border: 1px solid red; padding: 2px;', // Add attributes to the content container
        data_key3: 'value3'
    },
    imageUrl: "/img/sample.png",
    imageAttr: {// Add additional image attributes
        alt: 'Image',
        height: '25px',
        width: '25px'
    },
    items: [{
        text: "child1"
        //recursive...
    }],
    spriteCssClass: "spriteClass", // can be used to append icon before text??
    select: function (e) {
        console.log("select");
    }
};

2 Answers, 1 is accepted

Sort by
0
Bridge24
Top achievements
Rank 1
Iron
answered on 20 Jun 2019, 02:13 PM

This article looks like what I searched for all these years... but it's not linked at any place from the  kendo "jquery" documentation pages!

https://docs.telerik.com/aspnet-mvc/api/Kendo.Mvc.UI/PanelBarItemModel

 

0
Nencho
Telerik team
answered on 24 Jun 2019, 08:27 AM
Hello Daniel,

I am happy that you were able to find the needed documentation for the model structure. As for the existence in jQuery, we are considering extracting this information in a separate files. However, would you comment on weather adding a corresponding article for the PanelBarItem like for the tree view would be suitable for you?

https://docs.telerik.com/kendo-ui/controls/navigation/treeview/overview#item-properties

Regards,
Nencho
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
General Discussions
Asked by
Bridge24
Top achievements
Rank 1
Iron
Answers by
Bridge24
Top achievements
Rank 1
Iron
Nencho
Telerik team
Share this question
or