Question : OnSelectedIndexChanged not firing when user tabs

I'm using a ddl that allows a user to start typing and the list jumps ahead to the correct item. The ddl selected value is also then used to load values in a list box in the same form. Everything works fine if you click and select the item from the ddl, but if you start typing and navigate to the item and then tab out of the ddl, the post back does not seem to be happening to fill the list box contol.
1:
2:
3:
4:
5:
6:
7:
8:
9:
<asp:DropDownList EnableViewState="true" ID="customer_dropdown" OnSelectedIndexChanged="changedd" AutoPostBack="True" runat="server" DataSourceID="datasource_customer" DataTextField="customer_name" DataValueField="customer_id" Width="500px" Enabled="true" onFocus="ml_autocomplete.populate(event)" onKeyDown="ml_autocomplete.setSelection(event)" onKeyPress="javascript:return false"></asp:DropDownList>


Protected Sub changedd(ByVal sender As Object, ByVal e As System.EventArgs) Handles customer_dropdown.SelectedIndexChanged
        Dim selected_dd_value As Integer = customer_dropdown.SelectedValue
        Dim select_command As String = "select profile_id, profile_text from bartrack_view_profile_text where customer_id=" & selected_dd_value

        datasource_opportunity.SelectCommand = select_command
        End Sub

Answer : OnSelectedIndexChanged not firing when user tabs

AutoPostBack is a server-side construct, and doesn't come into play with client-side script code.  Since you probably have AutoPostBack = True already set, you are seeing that it doesn't give you the post back that you need.  Checking for the tab key in your script code would certainly be a good place to get this functionality.
Random Solutions  
 
programming4us programming4us