aspnet-js-aspxclientbegincallbackeventargs.md
Gets a command name that identifies which client action initiated a callback.
command: string
| Type | Description |
|---|---|
| string |
The name of the command which initiated a callback.
|
The following command names are used by different DevExpress web controls.
ASPxGridView callback commands
Refer to the ASPxClientGridViewCallbackCommand class to get client constants that contain the names of the GridView’s default commands executed through callbacks.
ASPxCardView callback commands
Refer to the ASPxClientCardViewCallbackCommand class to get client constants that contain the names of the Card View’s default commands executed through callbacks.
ASPxGantt callback commands
ASPxDataView callback commands
ASPxFileManager callback commands
Refer to the ASPxClientFileManagerCallbackCommand class to get client constants that contain the names of the File Manager’s default commands executed through callbacks.
ASPxScheduler callback commands
ASPxTreeList callback commands
ASPxVerticalGrid callback commands
Refer to the ASPxClientVerticalGridCallbackCommand class to get client constants that contain the names of the VerticalGrid’s default commands executed through callbacks.
The following example illustrates how to use the command property.
Web Forms approach:
<dx:ASPxGridView runat="server" ID="ASPxGridView1" ... >
<ClientSideEvents EndCallback="OnEndCallback" BeginCallback="OnBeginCallback"/>
...
</dx:ASPxGridView>
var command = "";
function OnBeginCallback(s, e) {
command = e.command;
}
function OnEndCallback(s, e) {
if (command == "ADDNEWROW") {
s.Refresh();
}
}
MVC approach:
@Html.DevExpress().GridView(settings => {
settings.Name = "GridView1";
settings.KeyFieldName = "ID";
settings.ClientSideEvents.BeginCallback = "function(s, e) { command = e.command; }";
settings.ClientSideEvents.EndCallback = "function(s, e) { if (command == 'ADDNEWROW') {
s.Refresh(); } }";
}).Bind(Model).GetHtml()
See Also
ASPxClientGridViewCallbackCommand