[求助]Datagird 里动态绑定textbox控件-->bygg转移
我想在datagrid里动态添加textbox控件..而且用摸板列绑定它......datagrid控件已经用摸板列绑定了一些数据!!!!!!!
Private Sub Datagrid3_ItemCreated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles Datagrid3.ItemCreated
Dim ctr As String
ctr = "<asp:TextBox runat='server' ID='haha' text='Button' />"
Dim ctrl As Control = New Control
ctrl = Page.ParseControl(ctr)
Datagrid3.Controls.Add(ctrl)
'Dim tb As TextBox = New TextBox
'tb.ID = "mytxt"
'tb.Text = "123"
'Datagrid3.Controls.Add(tb)
End Sub