G
Guest
I have a datagrid that includes a dropdown in an edit template. It creates
ok, but i'm not sure how to set the selectedvalue based on the table in the
dataset.
given that the dataset DsSubTypes1 what is the best way to get the current
value. If it can be taken from the datagrid i'd like to know how.
My sub to populate the dropdownlist is below.
thanks
kes
If e.Item.ItemType = ListItemType.EditItem Then
Dim thsddl As DropDownList =
e.Item.Cells(4).Controls(0).FindControl("ddlTF")
thsddl.DataSource = DsSubTypes1
thsddl.DataTextField = "TFDesc"
thsddl.DataValueField = "TFValue"
thsddl.DataBind()
'thsddl.SelectedValue =
End If
ok, but i'm not sure how to set the selectedvalue based on the table in the
dataset.
given that the dataset DsSubTypes1 what is the best way to get the current
value. If it can be taken from the datagrid i'd like to know how.
My sub to populate the dropdownlist is below.
thanks
kes
If e.Item.ItemType = ListItemType.EditItem Then
Dim thsddl As DropDownList =
e.Item.Cells(4).Controls(0).FindControl("ddlTF")
thsddl.DataSource = DsSubTypes1
thsddl.DataTextField = "TFDesc"
thsddl.DataValueField = "TFValue"
thsddl.DataBind()
'thsddl.SelectedValue =
End If