New to Kendo UI for jQuery? Start a free 30-day trial

Toolbar.items.icon

configuration

Specifies the icon's name that will be rendered inside the toolbar button. When you set this option, the TreeList renders an additional span element inside the toolbar button which has a name set to the option value. This approach allows you to display an icon inside your custom toolbar commands.

Set this option to an icon descriptor such as { name: "gear", variant: "outline" }. The variant can be outline, solid, or duotone; it applies to SVG rendering and is ignored for font icons.

toolbar.items.icon

String|Object
<div id="treelist"></div>
<script>
  $("#treelist").kendoTreeList({
    columns: [
      { field: "Name" },
      { field: "Position" }
    ],
    dataSource: [
      { id: 1, Name: "Daryl Sweeney", Position: "CEO", parentId: null },
      { id: 2, Name: "Guy Wooten", Position: "Chief Technical Officer", parentId: 1 }
    ],
    toolbar: {
      items: [
        {
          name: "settings",
          text: "Settings", 
          icon: "k-icon k-i-gear"
        }
      ]
    }
  });
</script>

The name of the SVG icon.

<div id="treelist"></div>
<script>
  $("#treelist").kendoTreeList({
    columns: [
      { field: "Name" },
      { field: "Position" }
    ],
    dataSource: [
      { id: 1, Name: "Daryl Sweeney", Position: "CEO", parentId: null },
      { id: 2, Name: "Guy Wooten", Position: "Chief Technical Officer", parentId: 1 }
    ],
    toolbar: {
      items: [
        {
          name: "settings",
          text: "Settings",
          icon: {
              name: "k-icon k-i-gear"
          }
        }
      ]
    }
  });
</script>

The SVG icon variant. Supported values are outline, solid, and duotone. The variant applies to SVG rendering and is ignored for font icons.

<div id="treelist"></div>
<script>
  $("#treelist").kendoTreeList({
    columns: [
      { field: "Name" },
      { field: "Position" }
    ],
    dataSource: [
      { id: 1, Name: "Daryl Sweeney", Position: "CEO", parentId: null },
      { id: 2, Name: "Guy Wooten", Position: "Chief Technical Officer", parentId: 1 }
    ],
    toolbar: {
      items: [
        {
          name: "settings",
          text: "Settings",
          icon: {
              name: "k-icon k-i-gear",
              variant: "outline"
          }
        }
      ]
    }
  });
</script>