I have a datagrid with column #3 as a drop down list. I'm creating an UpdateCommand event to handle changes made to that column by a user in EDIT mode.
I'm attempting to use the .SelectedValue member to identify when updates are made to that column. However, it appears that .SelectedValue is representing the previous value that the ddl had, not the updated value that was changed in EDIT mode. For example - If a user changes Column 3 from "A" to "B", SelectedValue still shows "A".
Am I using .SelectedValue correctly, or should I use another means to retrieve the changed value? Thanks.
--
Mike
I'm attempting to use the .SelectedValue member to identify when updates are made to that column. However, it appears that .SelectedValue is representing the previous value that the ddl had, not the updated value that was changed in EDIT mode. For example - If a user changes Column 3 from "A" to "B", SelectedValue still shows "A".
Am I using .SelectedValue correctly, or should I use another means to retrieve the changed value? Thanks.
Code:
Private Sub DataGrid1_UpdateCommand(ByVal source As Object, _
ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) _
Handles DataGrid1.UpdateCommand
'Identify the DropDown List being used
Dim DDL As DropDownList = _
CType(e.Item.Cells(2).Controls(1), DropDownList)
'Newly Selected Value
Dim NewSpecie As String = DDL.SelectedValue
--
Mike