aspnet-js-aspxclientbegincallbackeventargs-d2eea904.md
Provides data for client events related to the beginning of a callback processing round trip.
declare class ASPxClientBeginCallbackEventArgs extends ASPxClientEventArgs
Objects of the ASPxClientBeginCallbackEventArgs type are used as arguments for the BeginCallback events generated on the client side.
ASPxClientBeginCallbackEventArgs objects with proper settings are automatically created and passed to the corresponding event handlers.
The following example illustrates how to use the command property.
Web Forms:
<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:
@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()
ASPxClientEventArgs ASPxClientBeginCallbackEventArgs ASPxClientGlobalBeginCallbackEventArgs
See Also