Tab

ClientSideEventsBase.SetEventHandler(String, String) Method

Defines a handler for the specified DevExpress client event.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v20.1.dll

Declaration

public void SetEventHandler(
    string eventName,
    string value
)
Public Sub SetEventHandler(
    eventName As String,
    value As String
)

Parameters

Name Type Description
eventName String

A string specifying the required client event's name.

value String

A string that specifies either the name of a JavaScript function or the entire JavaScript function code used to handle an event.

Remarks

Note that the SetEventHandler method can define a handler only for DevExpress client events provided by the ClientSideEvents property.

To learn more about client side events, see the Client-Side Events topic.

Examples

MyMenu.ClientSideEvents.SetEventHandler("ItemClick", "function(s, e) { alert(s.name); }");
MyMenu.ClientSideEvents.SetEventHandler("Init", "MyFunction");
See Also