Skip to main content

ClientSideEventsBase.SetEventHandler(String, String) Method

Defines a handler for the specified DevExpress client event.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.1.dll

NuGet Package: DevExpress.Web


public void SetEventHandler(
    string eventName,
    string value


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.


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.


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