[CLOSED] ComboBox SelectedItem.Value Showing Instead of DisplayField [0.8.2.983]

  1. #1

    [CLOSED] ComboBox SelectedItem.Value Showing Instead of DisplayField [0.8.2.983]

    I get the following error below when I change the selected index to something other then 0 on the combobox and when a postback occurs it shows the selected value instead of the display value and I finally get an error. This does not happen when the selected index is 0 for the combobox. Do I have something setup incorrectly on my combobox.

    The Store gets bound to a System.DataView.

    Error Message:

     
    Microsoft JScript runtime error: 'this.store.getAt(...)' is null or not an object
     
    {this[this.fireSelect?"setValueAndFireSelect":"setValue"](this.store.getAt(index).get(this.valueField||this.displayField));
    The value for this.store.getAt(index) = 1
     
     
    <ext:ScriptManager ID="ScriptManager1" RenderStyles="None" runat="server">
    <Listeners>
    <DocumentReady Handler="Coolite.AjaxEvent.showFailure = Ext.emptyFn;" />
    </Listeners>
    </ext:ScriptManager>
    <uc1:EnterKey ID="EnterKey1" runat="server" />
    <link rel="stylesheet" type="text/css" href="../../../../extjs/resources/css/ext-all-light-green.css" />
    <ext:Store runat="server" ID="clProductStore">
    <Reader>
    <ext:JsonReader ReaderID="atnProductVersionId">
    <Fields>
    <ext:RecordField Name="strProductVersionNumber" />
    <ext:RecordField Name="numRetailprice" Type="Float" />
    <ext:RecordField Name="numCustomerPrice" Type="Float" />
    <ext:RecordField Name="atnProductVersionId" Type="Int" />
    <ext:RecordField Name="strProductName" Type="String" />
    <ext:RecordField Name="strProductSize" Type="String" />
    <ext:RecordField Name="strProductVersionMessages" Type="String" />
    <ext:RecordField Name="strProductVersionBackOrderMessage" Type="String" />
    <ext:RecordField Name="numMaxQuantity" Type="Int" />
    </Fields>
    </ext:JsonReader>
    </Reader>
    
    </ext:Store>
    <br />
    <ext:Panel ID="clPanelProductVersions" Border="false" runat="server" Height="150">
    <Body>
    <table class="noprint" id="Table3" cellspacing="1" cellpadding="3" border="0">
    <tr>
    <td class="PCProductNumber" style="padding-left: 3px" colspan="1" rowspan="1">
    Number
    </td>
    </tr>
    <tr>
    <td style="padding-left: 3px">
    <ext:ComboBox ID="clComboBoxProducts" TriggerAction="All" ForceSelection="true" Mode="Local" EnableViewState="false" Width="175" Editable="false" 
    
    ListWidth="175" runat="server" StoreID="clProductStore" 
    DisplayField="strProductVersionNumber" ValueField="atnProductVersionId" ItemSelector="table.searchitem">
    
    <Template ID="Template1" runat="server">
    <tpl for=".">
    <table class="searchitem">
    <tr>
    <td class="defaulttextstrong">
    {strProductVersionNumber} - {strProductName}
    </td>
    </tr>
    <tr>
    <td class="oomessagesmall">
    {strProductSize}
    </td>
    </tr>
    <tr>
    <td class="oomessagesmall">
    Suggested List Price: {numRetailprice:usMoney}
    </td> 
    </tr>
    <tr>
    <td class="oomessagesmall">
    Your Price: {numCustomerPrice:usMoney}
    </td>
    </tr>
    <tr>
    <td class="oomessagesmall">
    {strProductVersionMessages:htmlDecode} 
    </td> 
    </tr>
    
    </table>
    </tpl> 
    </Template> 
    </ext:ComboBox>
    </td>
    </tr>
    <tr>
    <td>
    </td>
    </tr>
    </table>
    <table class="noprint" id="Table4" cellspacing="1" cellpadding="1" border="0">
    <tr>
    <td class="PCProductQty" style="padding-left: 3px">
    <ext:Label ID="clLabelQty" Text="Qty" EnableViewState="false" runat="server">
    </ext:Label>
    </td>
    </tr>
    <tr>
    <td style="padding-left: 3px" colspan="1" rowspan="1">
    <ext:TextField EnableKeyEvents="true" EnableViewState="false" MaxLength="3" Width="50"
    Regex="^[0-9]" RegexText="Invalid Quantity"
    AllowBlank="false" ID="clTextFieldQtyQuickAdd" runat="server">
    
    </ext:TextField>
    <span style="padding-left: 5px"></span>
    
    </td>
    </tr>
    <tr>
    <td style="padding-left: 3px">
    </td>
    </tr>
    <tr>
    <td style="padding-left: 3px">
    <ext:Label ID="clLabelValMessage" Cls="oomessagemdium" EnableViewState="false" runat="server">
    </ext:Label>
    </td>
    </tr>
    <tr>
    <td style="padding-left: 3px">
    <ext:Label ID="clLabelAddToCartMessage" Height="60" Cls="oomessagesmall" EnableViewState="false" runat="server">
    
    </ext:Label> 
    </td>
    </tr>
    </table>
    </Body>
    </ext:Panel>
    <div style="padding-left:5px">
    <ext:ImageButton Align="AbsBottom" ID="clImageButtonAddToCart" EnableViewState="false" CausesValidation="true"
    ImageUrl="components/projectcomponents/productcatalog/images/addcart1.gif" OverImageUrl="components/projectcomponents/productcatalog/images/addcart2.gif"
    runat="server">
    <AjaxEvents>
    <Click OnEvent="CartClick">
    <EventMask Msg="Adding Item to Your Cart" ShowMask="true" />
    </Click>
    </AjaxEvents>
    </ext:ImageButton>
    </div>
    Last edited by geoffrey.mcgill; Jul 28, 2010 at 8:33 PM.
  2. #2
    Hi,

    Please provide test sample which we can test locally. I don't see where and how you set the index, also I don't see what data do you bind
  3. #3
    Hello, JD!

    Is this topic still open? We need a sample demonstrating the issue to help you.
    Last edited by geoffrey.mcgill; Jul 28, 2010 at 8:33 PM. Reason: marked as [CLOSED]

Similar Threads

  1. Replies: 2
    Last Post: Mar 03, 2012, 3:33 PM
  2. [CLOSED] Combobox SelectedItem
    By Sevilay Tanış in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Feb 13, 2012, 2:02 PM
  3. Replies: 4
    Last Post: Nov 30, 2011, 5:25 AM
  4. [CLOSED] [1.0] ComboBox.SelectedItem.Value
    By sadaf in forum 1.x Legacy Premium Help
    Replies: 9
    Last Post: Jul 15, 2011, 11:21 PM
  5. Replies: 4
    Last Post: Feb 02, 2010, 4:08 PM

Posting Permissions