Problem with paging in combo box

  1. #1

    Problem with paging in combo box

    Hi. I am new to Ext.net
    I am integrating combo box in grid
    var SupplierRenderer = function(value) {
                var r = dsSupplier.getById(value);
    
                if (Ext.isEmpty(r)) {
                    return "";
                }
    
                return r.data.SupplierName;
            };
    ...
    <ext:GridPanel>
     <ColumnModel ID="ColumnModel1" runat="server">
              <Columns>
                      <ext:Column DataIndex="supplierid" Header="Supplier" Width="150">
                                <Renderer Fn="SupplierRenderer" />
                                <Editor>
                                      <ext:ComboBox ID="Suppliercombo" runat="server" 
                                        Mode="Local" 
                                        TriggerAction="All" 
                                        ForceSelection="true"
                                        StoreID="dsSupplier"
                                        ValueField="sid"
                                        DisplayField="SupplierName"
                                        MinChars="1"
                                        ListWidth="300"
                                        PageSize="15"
                                        ItemSelector="tr.list-item"
                                        TypeAhead="true">
                                        <Template ID="Template2" runat="server">
                                            <Html>
    										    <tpl for=".">
    											    <tpl if="[xindex] == 1">
    												    <table class="txtCustomers-list">
    													    <tr>
    														    <th>Supplier</th>
    														    <th>Description</th>
    													    </tr>
    											    </tpl>
    											    <tr class="list-item">
    												    <td style="padding:3px 0px;">{SupplierName}</td>
    												    <td>{Description}</td>
    											    </tr>
    											    <tpl if="[xcount-xindex]==0">
    												    </table>
    											    </tpl>
    										    </tpl>
    									    </Html>
                                        </Template>
                                        
                                       </ext:ComboBox>
                                </Editor>
                            </ext:Column>
                </Columns>
    </ColumnModel>
    </ext:GridPanel>
    ...
    Here is my store
     <ext:Store ID="dsSupplier" runat="server">
            <Proxy>
                <ext:HttpProxy Url="/Supplier/GetSuppliers/" />
            </Proxy>
            <Reader>
                <ext:JsonReader  IDProperty="sid" Root="data" TotalProperty="total">
                    <Fields>
                       <ext:RecordField Name="sid" />
                       <ext:RecordField Name="SupplierName" SortDir="ASC"/>
                       <ext:RecordField Name="Description" />
                    </Fields>
                </ext:JsonReader>
            </Reader>
             <BaseParams>
                <ext:Parameter Name="limit" Value="15" Mode="Raw" />
                <ext:Parameter Name="start" Value="0" Mode="Raw" />
                <ext:Parameter Name="dir" Value="ASC" />
                <ext:Parameter Name="sort" Value="sid" />
            </BaseParams>
            <SortInfo Field="sid" Direction="ASC" />
        </ext:Store>
    according to my code, my combo box will be paged with 15 records each page, GetSupplier function from my controller ( i am using asp.net mvc) will return first 15 records from table Supplier. And the problem is when my supplierid is 25th record, the combo box Suppliercombo can not find the real SupplierName of it because it is looking only in the first 15 records. Therefore, it returns supplierid instead of SupplierName. If supplierid is in the first 15 records, it works fine as i expected.

    Waiting for your help!
    Thanks in advance
    Last edited by t2kien; Nov 10, 2010 at 1:51 PM.

Similar Threads

  1. combo box paging refresh button
    By rich27 in forum 1.x Help
    Replies: 0
    Last Post: Aug 02, 2012, 2:50 PM
  2. Paging in Live Search Combo...
    By kabalkunz in forum 1.x Help
    Replies: 2
    Last Post: Oct 27, 2011, 3:04 PM
  3. Problem with the paging combo box
    By huynd in forum 1.x Help
    Replies: 1
    Last Post: Aug 26, 2010, 8:11 AM
  4. Linked Combo Box Problem
    By ary sucaya in forum 1.x Help
    Replies: 0
    Last Post: Jun 04, 2010, 11:40 AM
  5. Combo Box Problem
    By jpmcm88 in forum 1.x Help
    Replies: 2
    Last Post: Jul 15, 2009, 2:59 PM

Posting Permissions