AutoCompleteBoxPropertiesBase.CallbackPageSize Property
Gets or sets the number of items returned from the server on each callback request performed in response to a predefined client user action.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v18.2.dll
Declaration
Property Value
Type | Default | Description |
---|---|---|
Int32 | 100 | An integer value that specifies the number of items to dynamically obtain from the server. |
Remarks
This property is in effect if the AutoCompleteBoxPropertiesBase.EnableCallbackMode property is set to true. In this mode, only a specific portion of the items list is initially sent to the client. Then, other items are dynamically loaded via callbacks from the server on demand (for instance, when an end-user scrolls the editor’s item list). Use the CallbackPageSize property to specify the number of items to be obtained from the server each time it’s required (the initial number of items also depends upon the CallbackPageSize property’s setting).
Note
In callback mode (the AutoCompleteBoxPropertiesBase.EnableCallbackMode property is set to True), the AutoCompleteBoxPropertiesBase.DropDownRows property value should not be greater than the value of the CallbackPageSize property.
Note
The CallbackPageSize property synchronizes its value with the editor’s ASPxAutoCompleteBoxBase.CallbackPageSize property.
Example
The following example illustrates how to use the CallbackPageSize property.
WebForms approach:
Note
For a full example, see the ASPxComboBox - Callback Mode demo.
<dx:ASPxComboBox ID="ASPxComboBox1" runat="server" DataSourceID="CountriesDataSource"
TextField="CountryName" ValueField="CountryName" Width="285px" SelectedIndex="0"
CallbackPageSize="15" EnableCallbackMode="True" EnableViewState="false"/>
MVC approach:
Note
For a full example, refer to MVC ComboBox Extension - Cascading Combo Boxes.
@Html.DevExpress().ComboBox(settings => {
settings.Name = "City";
settings.Properties.TextField = "Name";
settings.Properties.ValueField = "ID";
settings.Properties.CallbackPageSize = 20;
...
settings.Properties.ClientSideEvents.BeginCallback = "function(s, e) { e.customArgs['Country'] = Country.GetValue(); }";
}).BindList(CS.Models.City.GetCities(Model.Country)).Bind(Model.City).GetHtml()
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the CallbackPageSize property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.