could someone help me out with this??
i am creating a dropdown(dd2) dynamically inside a <div> , on the selected index event of another dropdown(dd1). somehow i am not able to handle or get the selectedindexch ange event of dd2. i get the values inside dd2, but does not respond to any event. i am using
the code is as below.
[code=asp]
Function getdatafromdb(B yVal s As String) As String
Try
dtChild = New DataTable
Select Case Trim(s).ToUpper
Case UCase("sivsetup id"), UCase("sub"), UCase("subclien t"), UCase("edm_id") , UCase("convrt_w ho"), UCase("audit_wh o"), UCase("siv_inje ct"), UCase("engine_b uilt"), UCase("audit")
'Session("tblna me") = "p"
qrystr2 = "select distinct " + Trim(s) + " from edi_parent order by " + Trim(s) + ""
Case UCase("carrname "), UCase("scac")
qrystr2 = "select distinct " + Trim(s) + " from carreuro order by " + Trim(s) + ""
'Session("tblna me") = "ca"
Case UCase("clientna me"), UCase("clientno ")
'Session("tblna me") = "cl"
qrystr2 = "select distinct " + Trim(s) + " from clientdt order by " + Trim(s) + ""
End Select
mycmd = New MySqlCommand(qr ystr2, myconn)
mycmd.CommandTi meout = 0
adap = New MySqlDataAdapte r(mycmd)
adap.Fill(dtChi ld)
Dim ddlfiltervalue As New DropDownList
ddlfiltervalue. ID = "ddlfiltervalue "
ddlfiltervalue. DataSource = dtChild
ddlfiltervalue. Items.Add("--SELECT--")
ddlfiltervalue. DataTextField = s
ddlfiltervalue. DataBind()
Me.Controls.Add (ddlfiltervalue )
Dim sw As New StringWriter
Dim htw As New HtmlTextWriter( sw)
ddlfiltervalue. RenderControl(h tw)
Return sw.ToString
Catch ex As Exception
Response.Write( "Error filling data in child Grid" + ex.Message)
Finally
myconn.Close()
End Try
End Function
[/code]
i am creating a dropdown(dd2) dynamically inside a <div> , on the selected index event of another dropdown(dd1). somehow i am not able to handle or get the selectedindexch ange event of dd2. i get the values inside dd2, but does not respond to any event. i am using
the code is as below.
[code=asp]
Function getdatafromdb(B yVal s As String) As String
Try
dtChild = New DataTable
Select Case Trim(s).ToUpper
Case UCase("sivsetup id"), UCase("sub"), UCase("subclien t"), UCase("edm_id") , UCase("convrt_w ho"), UCase("audit_wh o"), UCase("siv_inje ct"), UCase("engine_b uilt"), UCase("audit")
'Session("tblna me") = "p"
qrystr2 = "select distinct " + Trim(s) + " from edi_parent order by " + Trim(s) + ""
Case UCase("carrname "), UCase("scac")
qrystr2 = "select distinct " + Trim(s) + " from carreuro order by " + Trim(s) + ""
'Session("tblna me") = "ca"
Case UCase("clientna me"), UCase("clientno ")
'Session("tblna me") = "cl"
qrystr2 = "select distinct " + Trim(s) + " from clientdt order by " + Trim(s) + ""
End Select
mycmd = New MySqlCommand(qr ystr2, myconn)
mycmd.CommandTi meout = 0
adap = New MySqlDataAdapte r(mycmd)
adap.Fill(dtChi ld)
Dim ddlfiltervalue As New DropDownList
ddlfiltervalue. ID = "ddlfiltervalue "
ddlfiltervalue. DataSource = dtChild
ddlfiltervalue. Items.Add("--SELECT--")
ddlfiltervalue. DataTextField = s
ddlfiltervalue. DataBind()
Me.Controls.Add (ddlfiltervalue )
Dim sw As New StringWriter
Dim htw As New HtmlTextWriter( sw)
ddlfiltervalue. RenderControl(h tw)
Return sw.ToString
Catch ex As Exception
Response.Write( "Error filling data in child Grid" + ex.Message)
Finally
myconn.Close()
End Try
End Function
[/code]
Comment