后台代码 .VB PrivateSub Page_Load()Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load IfNot IsPostBack Then bind() EndIf End Sub Sub bind() Dim d AsNew Data DataGrid1.DataSource = d.CreateDataSource() DataGrid1.DataBind() End Sub PrivateSub DataGrid1_EditCommand()Sub DataGrid1_EditCommand(ByVal source AsObject, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles DataGrid1.EditCommand DataGrid1.EditItemIndex = e.Item.ItemIndex bind() End Sub PrivateSub DataGrid1_ItemDataBound()Sub DataGrid1_ItemDataBound(ByVal sender AsObject, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles DataGrid1.ItemDataBound If e.Item.ItemType = ListItemType.EditItem Then Dim d1 AsNew DropDownList Dim d AsNew Data d1 =CType(e.Item.FindControl("d"), DropDownList) d1.DataSource = d.CreateDataSource() d1.DataTextField ="Stringvalue" d1.DatavalueField ="Integervalue" d1.DataBind() EndIf End Sub