[CLOSED] Not able to get selected item value of Empty Liste Item of Combobox on Code Behind (server side)

  1. #1

    [CLOSED] Not able to get selected item value of Empty Liste Item of Combobox on Code Behind (server side)

    Hi, We are using Ext.Net 2.5 version, facing an issue with Combobox selected item is not getting on server side of Empty Text item.


    • I add items to my combobox dynamically using store databinding but I obtain an empty string from the SelectedItem.Value when the item doesn't have any text.

    • whereas I am able get the value from Javascript.
    • I am unable to get value of the selecteditem if I select empty item.


    //Designer
    		<script runat="server">
    		protected void Page_Load(object sender, EventArgs e)
    		{
    			this.Store1.DataSource = new object[]
    			{
    				new object[] { "11", "Group1", },
    				new object[] { "12", "", },
    
    				new object[] { "13", "Group3", },
    				new object[] { "14", "Group4", }
    
    			};
    		}
    		</script>
    	
    		<ext:Store ID="store1" runat="server" AutoLoad="true">
                <Model>
                    <ext:Model ID="Model11" runat="server">
                        <Fields>
                            <ext:ModelField Name="GroupID" />
                            <ext:ModelField Name="GroupName" />
                        </Fields>
                    </ext:Model>
                </Model>
            </ext:Store>
    		
    		<ext:ComboBox ID="cbo1" runat="server" StoreID="store1"
                     DisplayField="GroupName" ValueField="GroupID" 
    				 EmptyText="Select" Width="200" Editable="true" 
    				 TypeAhead="true" ForceSelection="true" TriggerAction="All"
                     SelectOnFocus="true">
            </ext:ComboBox>
    		
    		//Code Behind
    
    		
    		Dim GroupID As Integer = -1
            If Not cbo1.SelectedItem.Value = Nothing And cbo1.SelectedItem.Index <> -1 Then
                GroupID = cboContactGroup.SelectedItem.Value
            End If
    
    


    Last edited by fabricio.murta; Apr 13, 2018 at 5:40 PM. Reason: no feedback from the user in 7+ days
  2. #2
    Hello @iansriley!

    Can you provide a runnable code sample, preferably in a single page? I can't seem to be able to understand and reproduce your test case with the bits of code you provided.
    Fabrício Murta
    Developer & Support Expert
  3. #3
    Hello @iansriley!

    It's been a while since we posted a request here for a runnable test case so we can reproduce the issue you are facing and be able to help you out solving it. Still, no response from you.

    Do you still need assistance with this thread?

    We may mark this thread as closed if you don't reply in 7+ days, but it won't prevent you from posting here whenever you feel best.
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. Replies: 3
    Last Post: May 14, 2013, 4:03 AM
  2. Replies: 17
    Last Post: Dec 17, 2012, 11:58 AM
  3. [CLOSED] Always selected Item is nothing for combobox as menu item
    By rnachman in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 04, 2011, 4:51 PM
  4. Replies: 0
    Last Post: Oct 25, 2010, 9:49 AM
  5. multi select add selected item on server side
    By [WP]joju in forum 1.x Help
    Replies: 4
    Last Post: Jan 09, 2009, 7:01 AM

Posting Permissions