BreadcrumbBuilder
Methods
BindToLocation(System.Boolean)
Indicates whether the Breadcrumb will enable/disable the binding to the location object of the browser on initialization.
Parameters
value - System.Boolean
The value that configures the bindtolocation.
Example
@(Html.Kendo().Breadcrumb()
.Name("breadcrumb")
.BindToLocation(false)
)
DelimiterIcon(System.String)
Defines a name of an existing icon in the Kendo UI Web Font Icons. The icon will be applied as separator between the segments of the Breadcrumb path.
Parameters
value - System.String
The value that configures the delimitericon.
Example
@(Html.Kendo().Breadcrumb()
.Name("breadcrumb")
.DelimiterIcon("shape-line")
)
Editable(System.Boolean)
Indicates whether the editing functionality of the Breadcrumb will be enabled/disabled.If the option is enabled the path will be editable. Clicking in an empty area of the component will trigger editing mode. Editing mode shows an input showing the value of the component enabling the end user to type a new path.
Parameters
value - System.Boolean
The value that configures the editable.
Example
@(Html.Kendo().Breadcrumb()
.Name("breadcrumb")
.Editable(false)
)
Items(System.Action)
Array of items to be rendered in Breadcrumb.
Parameters
configurator - System.Action<BreadcrumbItemFactory>
The action that configures the items.
Example
@(Html.Kendo().Breadcrumb()
.Name("breadcrumb")
.Items(items =>
{
items.Add()
.Type(BreadcrumbItemType.RootItem)
.Text("All Components")
.ShowText(true);
items.Add()
.Type(BreadcrumbItemType.Item)
.Text("Breadcrumb")
.ShowText(true);
})
)
Gap(System.Double)
Defines the space in pixels after the last item to stay empty.The gap value is taken into account when items overflow and continues to remain empty.
Parameters
value - System.Double
The value that configures the gap.
Example
@(Html.Kendo().Breadcrumb()
.Name("breadcrumb")
.Gap(150)
)
Messages(System.Action)
Defines the text of the root icon title that is displayed within the Breadcrumb.
Parameters
configurator - System.Action<BreadcrumbMessagesSettingsBuilder>
The action that configures the messages.
Example
@(Html.Kendo().Breadcrumb()
.Name("breadcrumb")
.Messages(m => m.RootTitle("test"))
)
Navigational(System.Boolean)
Indicates whether the navigation functionality of the Breadcrumb will be enabled/disabled.When navigational is set to false, automatic navigation (changing url location) is disabled by default. In this state, the click event will be prevented and navigation will occur only if programmatic navigation is implemented.When navigational is set to true, the url (path) will be automatically added to the href attribute of the rendered links. In this state, the click event will trigger navigation.
Parameters
value - System.Boolean
The value that configures the navigational.
Example
@(Html.Kendo().Breadcrumb()
.Name("breadcrumb")
.Navigational(true)
)
RootIcon(System.String)
Defines a name of an existing icon in the Kendo UI Web Font Icons. The icon will be applied as the first item(root) of Breadcrumb path.The root icon is clickable and resets the value of the component.
Parameters
value - System.String
The value that configures the rooticon.
Example
@(Html.Kendo().Breadcrumb()
.Name("breadcrumb")
.RootIcon("cloud")
)
Value(System.String)
Defines the value/path of the component. Each segments is separated by a slash.
Parameters
value - System.String
The value that configures the value.
Example
@(Html.Kendo().Breadcrumb()
.Name("breadcrumb")
.Value("Telerik UI/Navigation/Breadcrumb")
)
Size(Kendo.Mvc.UI.ComponentSize)
Sets the size of the component.
Parameters
value - ComponentSize
The value that configures the size.
Example
@(Html.Kendo().Breadcrumb()
.Name("breadcrumb")
.Size(ComponentSize.Medium)
)
Tag(System.String)
Sets the Breadcrumb tag. A nav tag is used by default.
Parameters
tag - System.String
Example
@( Html.Kendo().Breadcrumb()
.Name("Breadcrumb")
.Tag("input")
)
Events(System.Action)
Configures the client-side events.
Parameters
configurator - System.Action<BreadcrumbEventBuilder>
The client events action.
Example
@( Html.Kendo().Breadcrumb()
.Name("Breadcrumb")
.Events(events => events
.Click("onClick")
)
)
ToComponent()
Returns the internal view component.
Name(System.String)
Sets the name of the component.
Parameters
componentName - System.String
The name of the component.
Example
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(p => p.OrderID).Filterable(false);
columns.Bound(p => p.Freight);
})
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)
Deferred(System.Boolean)
Suppress initialization script rendering. Note that this options should be used in conjunction with
Parameters
deferred - System.Boolean
ModelMetadata(System.Web.Mvc.ModelMetadata)
Uses the Metadata of the Model.
Parameters
modelMetadata - System.Web.Mvc.ModelMetadata
The metadata set for the Model
HtmlAttributes(System.Object)
Sets the HTML attributes.
Parameters
attributes - System.Object
The HTML attributes.
HtmlAttributes(System.Collections.Generic.IDictionary)
Parameters
attributes - System.Collections.Generic.IDictionary<String,Object>
AsModule(System.Boolean)
Specifies whether the initialization script of the component will be rendered as a JavaScript module.
Parameters
value - System.Boolean
Render()
Renders the component.
Example
@(@Page Inherits="System.Web.Mvc.ViewPage<IEnumerable<Product>>" )
@( Html.Kendo().Grid(Model)
.Name("grid")
.DetailTemplate(product => {
)
Product Details:
<div>Product Name: @( product.ProductName )</div>
<div>Units In Stock: @( product.UnitsInStock )</div>
@(
})
.Render();
)
ScriptAttributes(System.Object,System.Boolean)
Sets the JavaScript attributes to the initialization script.
Parameters
attributes - System.Object
The JavaScript attributes.
overrideAttributes - System.Boolean
Argument which determines whether attributes should be overriden.
ScriptAttributes(System.Collections.Generic.IDictionary,System.Boolean)
Sets the JavaScript attributes to the initialization script.
Parameters
attributes - System.Collections.Generic.IDictionary<String,Object>
The JavaScript attributes.
overrideAttributes - System.Boolean
Argument which determines whether attributes should be overriden.