September 06, 2011

Add pagination to handle large number of data in EXT JS combobox


When the list of items is large, we can add pagination in combo box list, as shown in
the following screenshot:


Use configuration as pageSize: {number of items in one page} in Combo Box.
{

xtype: 'combo',
fieldLabel: 'ABC',
emptyText: '--- Please Select Alpha ---',
store:store,
displayField: 'name',
valueField: 'id',
selectOnFocus: true,
typeAhead: true,
editable: true,
triggerAction: 'all',
forceSelection: true,
minChars: 2,
pageSize:10 //configuring paging size to combo box
}

This pagination works same like Grid Panel pagination. Implementation is same.It uses same start and limit parameters to filter the records.
Note: this applies only when the combo box is in a remote mode

Reference: EXT JS Cook Book 3.0

No comments:

Post a Comment