Private Sub DataGrid1_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles DataGrid1.ItemDataBound
If e.Item.ItemType = ListItemType.EditItem Then
Dim List As New DropDownList
List = CType(e.Item.FindControl("DropDownList1"), DropDownList)
List.DataSource = Dszgbm1
List.DataTextField = "单位"
List.DataValueField = "单位"
List.DataBind()
List.SelectedValue = DataBinder.Eval(e.Item.DataItem, "单位").ToString
End If
End Sub
Private Sub MemberGrid_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles MemberGrid.ItemDataBound
If e.Item.ItemType = ListItemType.EditItem Then
Dim LevelList As New DropDownList
LevelList = CType(e.Item.FindControl("LevelList"), DropDownList)
LevelList.DataSource = Club.ShowManaList()
LevelList.DataTextField = "Level"
LevelList.DataValueField = "LevelID"
LevelList.DataBind()
LevelList.SelectedValue = DataBinder.Eval(e.Item.DataItem, "LevelID").ToString
End If
End Sub