llmclaughlin
Programmer
Not sure why this happening. I have a drop down list that I fill. I pick something from it which fills another drop down list. When I change the second drop down list the autopostback fires but the selectedindexchanged function does not on ddlFIELD1. Below is the code behind.
Private Sub ddlVALIDATION_POINT1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddlVALIDATION_POINT1.SelectedIndexChanged
Dim oGetFieldDesc As New clsFUNC_EXPECTEDRESULTS
Dim dbTABLE As New DataTable
dbTABLE = oGetFieldDesc.GetValFieldDesc(Me.ddlVALIDATION_POINT1.SelectedValue.ToString)
Me.txtVAL_POINT.Text = Me.ddlVALIDATION_POINT1.SelectedItem.Text
Me.ddlVALIDATION_POINT1.Visible = False
Me.txtVAL_POINT.Visible = True
Me.txtVAL_POINT.ReadOnly = True
'Me.ddlFIELD1.Items.Clear()
Me.ddlFIELD1.DataSource = dbTABLE
Me.ddlFIELD1.DataTextField = "DDLTEXT"
Me.ddlFIELD1.DataValueField = "DDLVALUE"
Me.ddlFIELD1.DataBind()
HTML side
<td width="150"><aspropDownList id="ddlVALIDATION_POINT1" RUNAT="SERVER" autopostback="True"></aspropDownList><asp:TextBox id="txtVAL_POINT" runat="server" Width="150PX" Visible="FALSE"></asp:TextBox></td>
<td><aspropDownList id="ddlFIELD1" RUNAT="SERVER" AutoPostBack="true"><asp:ListItem>-- Please Select --</asp:ListItem></aspropDownList><asp:TextBox id="txtFIELD1" runat="server" Width="75" Visible="false"></asp:TextBox></td>
Any suggestions
Thanks
Louie
Private Sub ddlVALIDATION_POINT1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddlVALIDATION_POINT1.SelectedIndexChanged
Dim oGetFieldDesc As New clsFUNC_EXPECTEDRESULTS
Dim dbTABLE As New DataTable
dbTABLE = oGetFieldDesc.GetValFieldDesc(Me.ddlVALIDATION_POINT1.SelectedValue.ToString)
Me.txtVAL_POINT.Text = Me.ddlVALIDATION_POINT1.SelectedItem.Text
Me.ddlVALIDATION_POINT1.Visible = False
Me.txtVAL_POINT.Visible = True
Me.txtVAL_POINT.ReadOnly = True
'Me.ddlFIELD1.Items.Clear()
Me.ddlFIELD1.DataSource = dbTABLE
Me.ddlFIELD1.DataTextField = "DDLTEXT"
Me.ddlFIELD1.DataValueField = "DDLVALUE"
Me.ddlFIELD1.DataBind()
HTML side
<td width="150"><aspropDownList id="ddlVALIDATION_POINT1" RUNAT="SERVER" autopostback="True"></aspropDownList><asp:TextBox id="txtVAL_POINT" runat="server" Width="150PX" Visible="FALSE"></asp:TextBox></td>
<td><aspropDownList id="ddlFIELD1" RUNAT="SERVER" AutoPostBack="true"><asp:ListItem>-- Please Select --</asp:ListItem></aspropDownList><asp:TextBox id="txtFIELD1" runat="server" Width="75" Visible="false"></asp:TextBox></td>
Any suggestions
Thanks
Louie