ASPxAutoCompleteBoxBase.Callback Event
Fires when a round trip to the server has been initiated by a call to the client PerformCallback
method.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v23.2.dll
NuGet Package: DevExpress.Web
Declaration
Event Data
The Callback event's data class is CallbackEventArgsBase. The following properties provide information specific to this event:
Property | Description |
---|---|
Parameter | Gets a string that contains specific information (if any) passed from the client side. |
Remarks
The Callback
event allows you to perform any desired server-side processing and update the editor’s content, if required, in response to a call to the client PerformCallback
method.
Specific information passed from the client side can be obtained via the Parameter property.
The necessary actions can be additionally performed on the client side before and after callback processing by using BeginCallback
and EndCallback
client events.
Note
- If an editor’s
PerformCallback
method is called on the client, theCallback
event will be generated on the server side on each callback request performed by the editor (or on the entire page’s postback). - The ASPxComboBox control allows you to modify the Items collection on callbacks only (e.g., add and remove items, populate ASPxComboBox controls with new data from a data source, etc.).
- The
Callback
event handler allows changing the control’s value/selection only on a callback that is caused by thePerformCallback
method. If the event is caused by internal callbacks (loading items on scrolling / items filtering), the control stops selection changing. - It is not possible, for example, to modify a column collection, change item selection, or change SelectionMode on callbacks. To perform these actions on the client side, you can wrap the control with the ASPxCallbackPanel control and process the required scenario on a callback to the panel.
After the PerformCallback
method is called on the client, the Callback
event handler is raised during each page postback. You can use the IsCallback property to determine if the PerformCallback
method raises the event.
protected void ASPxComboBoxInstance_Callback(object sender, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e) {
DevExpress.Web.ASPxEditors.ASPxComboBox cmb = (DevExpress.Web.ASPxEditors.ASPxComboBox)sender;
if(cmb.IsCallback) {
//Raised by PerformCallback
}
//else //Raised by Postback
}