Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DataGrid textboxes - help please

Status
Not open for further replies.

kristinac

Programmer
Jul 18, 2003
98
US
I have a datagrid with textboxes. I have figured out how to access the textboxes for input and save the data. Now I need to display a record's data. If there is an existing record, I need the info to display in the textboxes. However I cannot seem to access the cells or the textboxes. I've tried to gain access to one using:

Dim textbox As TextBox = dgFactors.Items.Item(0).FindControl("txtArea1")
textbox.text = "X"

Which is pretty much how I accessed them for input. However when I run the pgm, I get an "Index out of range..." error.

How can I display the data in the textboxes within my datagrid??

I would appreciate any assistance...Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top