New to Telerik UI for ASP.NET Core? Start a free 30-day trial

Defines the fluent API for configuring the Kendo UI SmartPasteButton for ASP.NET MVC events.

Definition

Constructors

Initializes a new instance of the SmartPasteButtonEventBuilder class.

C#
public SmartPasteButtonEventBuilder(IDictionary<string, object> events)
Parameters:eventsIDictionary<string, object>

The SmartPasteButton event handlers.

Methods

Defines the handler of the Click client-side event. Fires when the Button is clicked with the mouse, touched on a touch device, or ENTER (or SPACE) is pressed while the Button is focused.

C#
public SmartPasteButtonEventBuilder Click(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

SmartPasteButtonEventBuilder

Returns the current instance of SmartPasteButtonEventBuilder .

Defines the handler of the Click client-side event. Fires when the Button is clicked with the mouse, touched on a touch device, or ENTER (or SPACE) is pressed while the Button is focused.

C#
public SmartPasteButtonEventBuilder Click(string handler)
Parameters:handlerstring

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

Returns:

SmartPasteButtonEventBuilder

Returns the current instance of SmartPasteButtonEventBuilder .

Defines the handler of the Error client-side event. Fired when an error occurs during SmartPasteButton processing.

C#
public SmartPasteButtonEventBuilder Error(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

SmartPasteButtonEventBuilder

Returns the current instance of SmartPasteButtonEventBuilder .

Defines the handler of the Error client-side event. Fired when an error occurs during SmartPasteButton processing.

C#
public SmartPasteButtonEventBuilder Error(string handler)
Parameters:handlerstring

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

Returns:

SmartPasteButtonEventBuilder

Returns the current instance of SmartPasteButtonEventBuilder .

Defines the handler of the KendoKeydown client-side event. Triggered when the user presses a keyboard key while the Button is focused.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public SmartPasteButtonEventBuilder KendoKeydown(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

SmartPasteButtonEventBuilder

Returns the current instance of SmartPasteButtonEventBuilder .

Defines the handler of the KendoKeydown client-side event. Triggered when the user presses a keyboard key while the Button is focused.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public SmartPasteButtonEventBuilder KendoKeydown(string handler)
Parameters:handlerstring

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

Returns:

SmartPasteButtonEventBuilder

Returns the current instance of SmartPasteButtonEventBuilder .

Defines the handler of the RequestEnd client-side event. Fired when the SmartPasteButton completes processing a paste operation.

C#
public SmartPasteButtonEventBuilder RequestEnd(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

SmartPasteButtonEventBuilder

Returns the current instance of SmartPasteButtonEventBuilder .

Example:
C#
@( Html.Kendo().SmartPasteButton()
.Name("smartPaste")
.Events(e =&gt; e.RequestEnd(
@&lt;text&gt;
function(e){
event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the RequestEnd client-side event. Fired when the SmartPasteButton completes processing a paste operation.

C#
public SmartPasteButtonEventBuilder RequestEnd(string handler)
Parameters:handlerstring

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

Returns:

SmartPasteButtonEventBuilder

Returns the current instance of SmartPasteButtonEventBuilder .

Example:
C#
@( Html.Kendo().SmartPasteButton()
.Name("smartPaste")
.Events(events =&gt; events
.RequestEnd("onRequestEnd")
)
)

Defines the handler of the RequestStart client-side event. Fired when the SmartPasteButton begins processing a paste operation.

C#
public SmartPasteButtonEventBuilder RequestStart(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

SmartPasteButtonEventBuilder

Returns the current instance of SmartPasteButtonEventBuilder .

Example:
C#
@( Html.Kendo().SmartPasteButton()
.Name("smartPaste")
.Events(e =&gt; e.RequestStart(
@&lt;text&gt;
function(e){
event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the RequestStart client-side event. Fired when the SmartPasteButton begins processing a paste operation.

C#
public SmartPasteButtonEventBuilder RequestStart(string handler)
Parameters:handlerstring

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

Returns:

SmartPasteButtonEventBuilder

Returns the current instance of SmartPasteButtonEventBuilder .

Example:
C#
@( Html.Kendo().SmartPasteButton()
.Name("smartPaste")
.Events(events =&gt; events
.RequestStart("onRequestStart")
)
)