Click to See Complete Forum and Search --> : GridView
maverick786us
September 14th, 2007, 07:50 AM
I have a GridView in which one column has got TextBoxes. Now I want to extract the values within the textboxes on a outside Button Click (The button does'nt reside within the gridview). How can I accompalish this?/
Thanks in advance
andreasblixt
September 14th, 2007, 07:53 AM
Look into the FindControl() method of the Control class. You can use it to find a TextBox within a row of the GridView (you will need to loop through each row.)
maverick786us
September 14th, 2007, 08:05 AM
Look into the FindControl() method of the Control class. You can use it to find a TextBox within a row of the GridView (you will need to loop through each row.)
Thanks Can you show me some online example plz? That will make my work easier
millepag
September 14th, 2007, 09:14 PM
Try this...
foreach (GridViewRow row in GridView1.Rows)
{
TextBox my_textbox = (TextBox)row.FindControl("my_textbox_id");
}
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.