Hi,
I am having a few problems trying to get a textbox I added to a gridview.
Adding the textbox to gridview in the form load event
change value in textbox and click UpdateCode:Dim txt As New TextBox txt.ID = "txt1" txt.Width = 20 txt.Text = 1 GridView1.Rows(0).Cells(0).AddAt(0, txt)
The problem is that there is now no textbox in that cell even tho it is visible on webpage and I can even type in it?????Code:Protected Sub btnUpdate_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnUpdate.Click lblUpdateValue.Text = ctype(GridView1.Rows(0).Cells(0).Controls(0), textbox).Text End Sub
Can someone please help shed some light. Thanks in advance.




Reply With Quote