Skip to main content
Tab

ClientSideEventsBase.SetEventHandler(String, String) Method

Defines a handler for the specified DevExpress client event.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.2.dll

Declaration

public void SetEventHandler(
    string eventName,
    string value
)

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.

Example

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