ASPxClientListBox.PerformCallback(parameter) Method
Sends a callback to the server, and generates the server-side ASPxListBox.Callback event, passing it the specified argument.
#Declaration
PerformCallback(
parameter: string
): void
#Parameters
Name | Type | Description |
---|---|---|
parameter | string | A string value that represents any information that needs to be sent to the server-side ASPx |
#Remarks
Use the PerformCallback method if you need to asynchronously go to the server and perform some server-side processing using AJAX-based callback technology. You can pass the required information to be collected on the client side as a string of arguments (for instance, in the “Name = Value;” form) via the PerformCallback method’s parameter parameter.
The PerformCallback method posts back to the server using the callback technology, and generates a server-side ASPxListBox.Callback event. The method’s parameter argument is passed to the ASPxListBox.Callback event’s handler as the CallbackEventArgsBase.Parameter property. So, the necessary server-side actions can be performed in the event’s handler based upon the values of the arguments, obtained by parsing the passed information string.
Note
The ASPx
#Example
This part of the Multiple Selection demo illustrates how to use multi-selection mode for the ASPxListBox editor.
<dx:ASPxListBox ID="lbFeatures" runat="server" SelectionMode="CheckColumn" Height="210px"
DataSourceID="Features" ValueField="ID" ValueType="System.String" TextField="Name">
<ClientSideEvents SelectedIndexChanged="function(s, e) {lbModels.PerformCallback('1');}" />
</dx:ASPxListBox>
<dx:ASPxListBox ID="lbModels" runat="server" SelectionMode="CheckColumn"
Height="210px" width="250px" ClientInstanceName="lbModels"
DataSourceID="PhoneModels" ValueField="ID" ValueType="System.String"
OnCallback="lbModels_Callback" >
<Columns>
<dx:ListBoxColumn FieldName="Name" Caption="Model" width="100%"/>
<dx:ListBoxColumn FieldName="Price" width="50px"/>
</Columns>
</dx:ASPxListBox>
protected void lbModels_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e) {
FilterModels(lbFeatures.Items);
lbModels.DataBind();
}
protected void FilterModels(ListEditItemCollection items) {
...
}
...