Your post went unanswered. Have you resolved this issue?
--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"Andre" <> wrote in message
news:eTcyyJV$...
> Hi,
>
> I want to add a Textbox in my datatable before binding my datagrid
with
> it. But i can't find a way to do it.
>
> Did someone know what i'm doing wrong ?
>
> - If i write <asp:textbox....> the column is empty.
> - If i create my textbox on the onitemdatabind event, my textbox is on
> another line of the datagrid.
> - if i try to make it this way my colum is empty :
> Dim txtbox As New TextBox
> txtbox.Visible = True
> txtbox.Attributes.Add("runat", "server")
> txtbox.ID = "opt"
> txtbox.EnableViewState = True
> dr(1) = txtbox
>
> Thank you, and i paste a copy of my code below.
>
>
> Dim dt As DataTable = New DataTable
> Dim dr As DataRow
> Dim dv As DataView
>
> dt.Columns.Add(New DataColumn("Service", GetType(String)))
> dt.Columns.Add(New DataColumn("Option", GetType(TextBox)))
> dt.Columns.Add(New DataColumn("Install", GetType(Decimal)))
> dt.Columns.Add(New DataColumn("TypeA", GetType(String)))
> dt.Columns.Add(New DataColumn("Servicen", GetType(String)))
> dt.Columns.Add(New DataColumn("Month", GetType(Decimal)))
>
> if my product number = 10 ......
>
> dr = dt.NewRow
> dr(0) = "Product 10"
> dr(1) = *********** Create textbox here ************
> dr(2) = Prix
> dr(3) = myReader.GetString(3)
> dr(4) = String1
> dr(5) = myReader.GetValue(4)
> dt.Rows.Add(dr)
>
> dv = New DataView(dt)
> DataGrid1.DataSource = dv
> DataGrid1.DataBind()
>
>