Jun 28, 2010, 4:34 AM
Need help for Combobox paging event
Hi everyone
I need to use combobox
My problem is that the store is so big with more than 33.000 rows
So that I need to use 2 rows combobox with paging like this:
I need to do like this:
- when the page start up, my combobox just load 10 rows, and it show total numbers of page (each page contain 10rows, in my case it show page 1 of 3300 pages),and show Next/Previous buttons
- when user click next button, it call ajax event to load next 10 rows match with the page index
Please show me how to do it. Thanks all
I need to use combobox
My problem is that the store is so big with more than 33.000 rows
So that I need to use 2 rows combobox with paging like this:
<ext:ComboBox
ID="cboAccountDetail"
runat="server"
EmptyText="Select Item"
TypeAhead="true"
ForceSelection="true"
StoreID="storeAccountItem"
ValueField="UniqueID"
MinChars="1"
ListWidth="300"
PageSize="10"
ItemSelector="tr.list-item"
Width = "310" X= "10" Y = "35">
<Template ID="Template1" runat="server">
<html>
<tpl for=".">
<tpl set = "[xcount = 100]" if="[xindex] == 1" >
<table class="cbStates-list">
<tr>
<th></th>
</tr>
</tpl>
<tr class="list-item">
<td style="padding:3px 0px; font-size :12">{LastName} , {FirstName} {MiddleName} [{UniqueID}]</td>
</tr>
<tpl if="[xcount-xindex]==0">
</table>
</tpl>
</tpl>
</html>
</Template>
<Triggers>
<ext:FieldTrigger Icon="Clear" HideTrigger="true" />
</Triggers>
<Listeners>
<BeforeQuery Handler="this.triggers[0][ this.getRawValue().toString().length == 0? 'hide' : 'show']();" />
<TriggerClick Handler="if (index == 0) { el.focus().clearValue(); trigger.hide();}" />
<Select Handler="el.triggers[0].show();" />
</Listeners>
</ext:ComboBox>
But the combobox bind all data to the store and slow down my cobobox any time user click onI need to do like this:
- when the page start up, my combobox just load 10 rows, and it show total numbers of page (each page contain 10rows, in my case it show page 1 of 3300 pages),and show Next/Previous buttons
- when user click next button, it call ajax event to load next 10 rows match with the page index
Please show me how to do it. Thanks all