C
CindyH
Hi
I'm using vs.net 2003.
I have a dropdownlist inside a datagrid.
I would like to be able to select a value from the dropdownlist and then
have a textbox which is also inside the datagrid filled with that value.
I'm calling OnSelectedIndexChanged="ddlGridMonth_SelectedIndexChanged" event
when an item from the dropdownlist is selected
I'm not sure of the code I should be using for this event.
Right now I'm trying something like this:
Dim vddMonth As DropDownList =
CType(dgMonthlyReports.FindControl("ddlGridMonth"), DropDownList)
Dim vddMonthvalue As String = vddMonth.SelectedItem.Value()
Dim vtextMonth As TextBox =
CType(dgMonthlyReports.FindControl("ReportMonth"), TextBox)
Dim vtextMonthValue As String = vtextMonth.Text
If vddMonthvalue <> 0 Then
vtextMonthValue = vddMonthvalue
End If
I'm getting the value of the dropdownlist, but not the textbox and then I
need to see if the dropdownlist value is something other then 0 and if so
write the value to the textbox.
Thanks,
CindyH
I'm using vs.net 2003.
I have a dropdownlist inside a datagrid.
I would like to be able to select a value from the dropdownlist and then
have a textbox which is also inside the datagrid filled with that value.
I'm calling OnSelectedIndexChanged="ddlGridMonth_SelectedIndexChanged" event
when an item from the dropdownlist is selected
I'm not sure of the code I should be using for this event.
Right now I'm trying something like this:
Dim vddMonth As DropDownList =
CType(dgMonthlyReports.FindControl("ddlGridMonth"), DropDownList)
Dim vddMonthvalue As String = vddMonth.SelectedItem.Value()
Dim vtextMonth As TextBox =
CType(dgMonthlyReports.FindControl("ReportMonth"), TextBox)
Dim vtextMonthValue As String = vtextMonth.Text
If vddMonthvalue <> 0 Then
vtextMonthValue = vddMonthvalue
End If
I'm getting the value of the dropdownlist, but not the textbox and then I
need to see if the dropdownlist value is something other then 0 and if so
write the value to the textbox.
Thanks,
CindyH