# TreeListToolbarFactory

## Properties

### TreeList - [TreeList](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui/treelist)

Gets the DataSource settings.

## Methods

### Cancel()

Adds an item for the cancel action.

#### RETURNS

Returns the current [TreeListToolbarBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/treelisttoolbarbuilder) instance.

#### Example

```
 
            	@(Html.Kendo().TreeList<EmployeeViewModel>()
            	    .Name("treelist")
               		.Toolbar(toolbar => toolbar.Cancel())
            	)
             
```

### Save()

Adds an item for the save action.

#### RETURNS

Returns the current [TreeListToolbarBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/treelisttoolbarbuilder) instance.

#### Example

```
 
            	@(Html.Kendo().TreeList<EmployeeViewModel>()
            	    .Name("treelist")
               		.Toolbar(toolbar => toolbar.Save())
            	)
             
```

### Search()

Adds an item for the search panel.

#### RETURNS

Returns the current [TreeListToolbarBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/treelisttoolbarbuilder) instance.

#### Example

```
 
            	@(Html.Kendo().TreeList<EmployeeViewModel>()
            	    .Name("treelist")
               		.Toolbar(toolbar => toolbar.Search())
            	)
             
```

### Custom(Kendo.Mvc.UI.Fluent.TemplateBuilder)

Adds a custom component to the toolbar.

#### Parameters

##### template - TemplateBuilder\<TModel>

The template component configuration for the custom component

#### RETURNS

Returns the current [TreeListToolbarBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/treelisttoolbarbuilder) instance.

#### Example

```
 
            	@(Html.Kendo().TreeList<EmployeeViewModel>()
            	    .Name("treelist")
            		.Toolbar(t =>
            		{
            			t.Custom(Html.Kendo().Template()
            			    .AddComponent(c => c
            			        .Button()
            		    	    .Name("refresh")
            		            .Icon("arrow-rotate-cw")
            		            .HtmlAttributes(new { title = "Refresh" })
            		            .Events(ev => ev.Click("refresh"))
            		    ));
            		})
            	)
             
```

### Separator()

Adds a separator to the ToolBar.

#### RETURNS

Returns the current [TreeListToolbarBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/treelisttoolbarbuilder) instance.

#### Example

```
 
            	@(Html.Kendo().TreeList<EmployeeViewModel>()
            	    .Name("treelist")
               		.Toolbar(toolbar => toolbar
               		    .Separator()
               		)
            	)
             
```

### Spacer()

Adds a spacer to the ToolBar.

#### RETURNS

Returns the current [TreeListToolbarBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/treelisttoolbarbuilder) instance.

#### Example

```
 
            	@(Html.Kendo().TreeList<EmployeeViewModel>()
            	    .Name("treelist")
               		.Toolbar(toolbar => toolbar
               		    .Spacer()
               		)
            	)
             
```

### Custom()

Adds a custom component to the toolbar.

#### RETURNS

Returns the current [TreeListToolbarBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/treelisttoolbarbuilder) instance.

#### Example

```
 
            	@(Html.Kendo().TreeList<EmployeeViewModel>()
            	    .Name("treelist")
            		.Toolbar(t =>
            		{
            			t.Custom(Html.Kendo().Template()
            			    .AddComponent(c => c
            			        .Button()
            		    	    .Name("refresh")
            		            .Icon("arrow-rotate-cw")
            		            .HtmlAttributes(new { title = "Refresh" })
            		            .Events(ev => ev.Click("refresh"))
            		    ));
            		})
            	)
             
```

### Create()

Adds an item for the create action.

#### RETURNS

Returns a [TreeListToolbarBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/treelisttoolbarbuilder) with the available configuration options.

### Excel()

Adds an item for the excel action.

#### RETURNS

Returns a [TreeListToolbarBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/treelisttoolbarbuilder) with the available configuration options.

### Pdf()

Adds an item for the pdf action.

#### RETURNS

Returns a [TreeListToolbarBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/treelisttoolbarbuilder) with the available configuration options.
