New to Telerik UI for ASP.NET MVC? Download free 30-day trial

DiagramEventBuilder

Methods

Add(System.String)

Defines the handler of the Add client-side event. Fires when the user adds a new shape or connection.

For more information see Add event.

Parameters

handler - System.String

The name of the JavaScript function that will handle the Add event.

Example


             @(Html.Kendo().Diagram()
               .Name("diagram")
               .Events(events => events.Add("onAdd"))
             )

Cancel(System.String)

Defines the handler of the Cancel client-side event. Fires when the user clicks the "Cancel" button in the popup window in case the item was added through the toolbar.

For more information see Cancel event.

Parameters

handler - System.String

The name of the JavaScript function that will handle the Cancel event.

Example


             @(Html.Kendo().Diagram()
               .Name("diagram")
               .Events(events => events.Cancel("onCancel"))
             )

Change(System.String)

Defines the handler of the Change client-side event. Fires when an item is added or removed to/from the Diagram.

For more information see Change event.

Parameters

handler - System.String

The name of the JavaScript function that will handle the Change event.

Example


             @(Html.Kendo().Diagram()
               .Name("diagram")
               .Events(events => events.Change("onChange"))
             )

Click(System.String)

Defines the handler of the Click client-side event. Fires when the user clicks on a shape or a connection.

For more information see Click event.

Parameters

handler - System.String

The name of the JavaScript function that will handle the Click event.

Example


             @(Html.Kendo().Diagram()
               .Name("diagram")
               .Events(events => events.Click("onClick"))
             )

DataBound(System.String)

Defines the handler of the DataBound client-side event. Fires when the Diagram is bound to data from its DataSource and ConnectionsDataSource.

For more information see DataBound event.

Parameters

handler - System.String

The name of the JavaScript function that will handle the DataBound event.

Example


             @(Html.Kendo().Diagram()
               .Name("diagram")
               .Events(events => events.DataBound("onDataBound"))
             )

Drag(System.String)

Defines the handler of the Drag client-side event. Fires when dragging shapes or connections.

For more information see Drag event.

Parameters

handler - System.String

The name of the JavaScript function that will handle the Drag event.

Example


             @(Html.Kendo().Diagram()
               .Name("diagram")
               .Events(events => events.Drag("onDrag"))
             )

DragEnd(System.String)

Defines the handler of the DragEnd client-side event. Fires after finishing dragging shapes or connections.

For more information see DragEnd event.

Parameters

handler - System.String

The name of the JavaScript function that will handle the DragEnd event.

Example


             @(Html.Kendo().Diagram()
               .Name("diagram")
               .Events(events => events.DragEnd("onDragEnd"))
             )

DragStart(System.String)

Defines the handler of the DragStart client-side event. Fires before starting dragging shapes or connections.

For more information see DragStart event.

Parameters

handler - System.String

The name of the JavaScript function that will handle the DragStart event.

Example


             @(Html.Kendo().Diagram()
               .Name("diagram")
               .Events(events => events.DragStart("onDragStart"))
             )

Edit(System.String)

Defines the handler of the Edit client-side event. Fires when the user edits a shape or connection.

For more information see Edit event.

Parameters

handler - System.String

The name of the JavaScript function that will handle the Edit event.

Example


             @(Html.Kendo().Diagram()
               .Name("diagram")
               .Events(events => events.Edit("onEdit"))
             )

ItemBoundsChange(System.String)

Defines the handler of the ItemBoundsChange client-side event. Fires when the location or size of a shape are changed.

For more information see ItemBoundsChange event.

Parameters

handler - System.String

The name of the JavaScript function that will handle the ItemBoundsChange event.

Example


             @(Html.Kendo().Diagram()
               .Name("diagram")
               .Events(events => events.ItemBoundsChange("onItemBoundsChange"))
             )

ItemRotate(System.String)

Defines the handler of the ItemRotate client-side event. Fires when a shape is rotated.

For more information see ItemRotate event.

Parameters

handler - System.String

The name of the JavaScript function that will handle the ItemRotate event.

Example


             @(Html.Kendo().Diagram()
               .Name("diagram")
               .Events(events => events.ItemRotate("onItemRotate"))
             )

MouseEnter(System.String)

Defines the handler of the MouseEnter client-side event. Fires when the mouse enters a shape or a connection. Will not fire for disabled items.

For more information see MouseEnter event.

Parameters

handler - System.String

The name of the JavaScript function that will handle the MouseEnter event.

Example


             @(Html.Kendo().Diagram()
               .Name("diagram")
               .Events(events => events.MouseEnter("onMouseEnter"))
             )

MouseLeave(System.String)

Defines the handler of the MouseLeave client-side event. Fires when the mouse leaves a shape or a connection. Will not fire for disabled items.

For more information see MouseLeave event.

Parameters

handler - System.String

The name of the JavaScript function that will handle the MouseLeave event.

Example


             @(Html.Kendo().Diagram()
               .Name("diagram")
               .Events(events => events.MouseLeave("onMouseLeave"))
             )

Pan(System.String)

Defines the handler of the Pan client-side event. Fires when the user pans the Diagram.

For more information see Pan event.

Parameters

handler - System.String

The name of the JavaScript function that will handle the Pan event.

Example


             @(Html.Kendo().Diagram()
               .Name("diagram")
               .Events(events => events.Pan("onPan"))
             )

Remove(System.String)

Defines the handler of the Remove client-side event. Fires when the user removes a shape or connection.

For more information see Remove event.

Parameters

handler - System.String

The name of the JavaScript function that will handle the Remove event.

Example


             @(Html.Kendo().Diagram()
               .Name("diagram")
               .Events(events => events.Remove("onRemove"))
             )

Save(System.String)

Defines the handler of the Save client-side event. Fires when the user saves a shape or a connection.

For more information see Save event.

Parameters

handler - System.String

The name of the JavaScript function that will handle the Save event.

Example


             @(Html.Kendo().Diagram()
               .Name("diagram")
               .Events(events => events.Save("onSave"))
             )

Select(System.String)

Defines the handler of the Select client-side event. Fires when the user selects one or more items.

For more information see Select event.

Parameters

handler - System.String

The name of the JavaScript function that will handle the Select event.

Example


             @(Html.Kendo().Diagram()
               .Name("diagram")
               .Events(events => events.Select("onSelect"))
             )

ZoomEnd(System.String)

Defines the handler of the ZoomEnd client-side event. Fires when the user changes the Diagram zoom level.

For more information see ZoomEnd event.

Parameters

handler - System.String

The name of the JavaScript function that will handle the ZoomEnd event.

Example


             @(Html.Kendo().Diagram()
               .Name("diagram")
               .Events(events => events.ZoomEnd("onZoomEnd"))
             )

ZoomStart(System.String)

Defines the handler of the ZoomStart client-side event. Fires when the user starts changing the Diagram zoom level.

For more information see ZoomStart event.

Parameters

handler - System.String

The name of the JavaScript function that will handle the ZoomStart event.

Example


             @(Html.Kendo().Diagram()
               .Name("diagram")
               .Events(events => events.ZoomStart("onZoomStart"))
             )

ToolBarClick(System.String)

Defines the handler of the ToolBarClick client-side event. Fires when the user clicks an item in the toolbar.

For more information see ToolBarClick event.

Parameters

handler - System.String

The name of the JavaScript function that will handle the ToolBarClick event.

Example


             @(Html.Kendo().Diagram()
               .Name("diagram")
               .Events(events => events.ToolBarClick("onToolBarClick"))
             )

In this article
Not finding the help you need?