Hi,
Try this code:
foreach (GridViewRow row in GridView1.Rows)
{
// Selects the text from the TextBox which is inside the GridView control
string textBoxText = ((TextBox)row.FindControl("TextBox1")).Text;
Response.Write(textBoxText);
}
Although the above code is in C# you can easily convert it to VB.NET
Whenever i have query regarding gridview i refer site
http://gridviewguy.com/CategoryDetai...x?categoryID=7
--
Hope this answers your question.
Thanks and Regards.
Manish Bafna.
MCP and MCTS.
"Ryan Smith" wrote:
Dim i As Integer
Dim Collected1 As TextBox
For i = 0 To (Grid.Items.Count - 1)
Collected1 = CType(Grid.Items(i).FindControl("COLLECTED"), TextBox)
Response.Write(Collected1.Text)
Next
This doesn't work and prints nothing even though data is in the textbox.
Any ideas - this is driving me mad...