DiagramEventBuilder

Methods

Add(System.String)

Defines the handler of the Add client-side event. Fired when the user adds new shape or connection.The event handler function context (available via the this keyword) will be set to the widget instance.

For more information see Add event.

Parameters

handler - System.String

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

Example

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

Cancel(System.String)

Defines the handler of the Cancel client-side event. Fired when the user clicks the "cancel" button in the popup window in case the item was added via a toolbar.

For more information see Cancel event.

Parameters

handler - System.String

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

Example

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

Change(System.String)

Defines the handler of the Change client-side event. Fired 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

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

Click(System.String)

Defines the handler of the Click client-side event. Fired 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

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

DataBound(System.String)

Defines the handler of the DataBound client-side event. Fired when the widget is bound to data from dataDource and connectionsDataSource.The event handler function context (available via the this keyword) will be set to the widget instance.

For more information see DataBound event.

Parameters

handler - System.String

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

Example

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

Drag(System.String)

Defines the handler of the Drag client-side event. Fired when dragging shapes or connection.

For more information see Drag event.

Parameters

handler - System.String

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

Example

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

DragEnd(System.String)

Defines the handler of the DragEnd client-side event. Fired after finishing dragging shapes or connection.

For more information see DragEnd event.

Parameters

handler - System.String

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

Example

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

DragStart(System.String)

Defines the handler of the DragStart client-side event. Fired before starting dragging shapes or connection.

For more information see DragStart event.

Parameters

handler - System.String

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

Example

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

Edit(System.String)

Defines the handler of the Edit client-side event. Fired 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

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

ItemBoundsChange(System.String)

Defines the handler of the ItemBoundsChange client-side event. Fired 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

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

ItemRotate(System.String)

Defines the handler of the ItemRotate client-side event. Fired 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

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

MouseEnter(System.String)

Defines the handler of the MouseEnter client-side event. Fired 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

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

MouseLeave(System.String)

Defines the handler of the MouseLeave client-side event. Fired 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

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

Pan(System.String)

Defines the handler of the Pan client-side event. Fired 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

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

Remove(System.String)

Defines the handler of the Remove client-side event. Fired 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

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

Save(System.String)

Defines the handler of the Save client-side event. Fired 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

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

Select(System.String)

Defines the handler of the Select client-side event. Fired 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

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

ToolBarClick(System.String)

Defines the handler of the ToolBarClick client-side event. Fired 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

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

ZoomEnd(System.String)

Defines the handler of the ZoomEnd client-side event. Fired 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

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

ZoomStart(System.String)

Defines the handler of the ZoomStart client-side event. Fired 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

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