Back to Devexpress

CommandStateChangedEvent Class

aspnetcore-js-devexpress-dot-richedit-fa246e40.md

latest2.7 KB
Original Source

CommandStateChangedEvent Class

An event that occurs after a command state has been changed.

Declaration

ts
export class CommandStateChangedEvent extends RichEditEvent<CommandStateChangedEventArgs>

Remarks

You can define the CommandStateChanged event handler either at the client side or at runtime.

Use the OnCommandStateChanged(String) method to specify the event handler.

cshtml
@(Html.DevExpress().RichEdit("richEdit")
 .OnCommandStateChanged("function(s,e){ /* your custom actions */ }")
 // ...

Use the commandStateChanged property to specify the event handler.

javascript
const options = DevExpress.RichEdit.createOptions();
options.events.commandStateChanged = function(s,e) { /* your custom actions */ };

The commandStateChanged property provides access to the addHandler(handler), removeHandler(handler), and clearHandlers methods that allow you to dynamically add and remove event handlers.

javascript
richEdit.events.commandStateChanged.addHandler(function(s, e) { /* your custom actions */ });

The event handler receives an argument of the CommandStateChangedEventArgs type. The argument’s properties provide information specific to this event.

Inherited Members

addHandler(handler)

clearHandlers

isEmpty

removeHandler(handler)

Inheritance

Event<TSource, TEventArgs> RichEditEvent<TEventArgs> CommandStateChangedEvent

See Also

Client-Side Events