Problem Combobox.SelectedItem Same Displayfield, Different Values

  1. #1

    Problem Combobox.SelectedItem Same Displayfield, Different Values

    Hallo Coolite Team,

    I have got a problem with the SelectedItem of the ComboxBox. I use the Custom Search Example as basis. This is my Combobox:

    <ext:ComboBox ID="DelName" runat="server" StoreID="Store7" DisplayField="Name" ValueField="ObjectID"
                            TypeAhead="false" LoadingText="Suche..." Width="200" PageSize="10" HideTrigger="true"
                            ItemSelector="" AllowBlank="false" BlankText="Der Lieferant muss eingegeben werden"
                            FieldLabel="Name*" MinChars="1">
                            <Template ID="Template1" runat="server">
                       <tpl for=".">
                          <div class="search-item">
                             <h3>{Name}</h3>{Contact}<br />{Street}<br />{Zipcode} {City}                        
                                <Select OnEvent="DelAddress_Select">
                                    <EventMask ShowMask="true" Msg="Hole Adresse..." Target="Parent" />
                                <ext:ToolTip ID="Tooltip48" runat="server" Html="Bitte wählen Sie die Lieferadresse durch Eingabe des Namens und der Auswahl. Ein * zeigt alle Lieferadressen an.">
    The items can have the same "Name" (DisplayField) but the ObjectID (ValueField) is always unique. When I choose an item (other items have the same name) I get the right Name and the right ObjectID during the Select event. The next step is to save the selection. I call the selecteditem again and now i get the Name and the ObjectID only of the first item with the same name in the list even if i have slected the last item with the same name.

    Here is the code of the select event:
    protected void DelAddress_Select(object sender, Coolite.Ext.Web.AjaxEventArgs e)
              Guid ObjectID=DelName.SelectedItem.Value;
    Later I click a button to save the selection:
     protected void btnAddress_Click(object sender, Coolite.Ext.Web.AjaxEventArgs e)
     Guid ObjectID=DelName.SelectedItem.Value;
    Thank you
  2. #2

    ComboBox unique display field issue


    i am also have same problem. how i can fix this issue?
  3. #3
    The thread is related to:

Similar Threads

  1. Replies: 10
    Last Post: May 16, 2014, 5:39 AM
  2. [CLOSED] Problem to show SelectedItem in Combobox v2.0
    By Oliver in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: May 28, 2012, 4:56 PM
  3. Replies: 4
    Last Post: Nov 30, 2011, 6:25 AM
  4. ComboBox SelectedItem according to Value problem
    By juredecman in forum 1.x Help
    Replies: 0
    Last Post: Aug 25, 2010, 9:57 PM
  5. Replies: 2
    Last Post: Jul 28, 2010, 7:50 AM

Posting Permissions