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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Datagrid Update problems

Status
Not open for further replies.

trueneutral

Programmer
Sep 15, 2003
13
CA
I’m having some trouble with the Update function in my datagrid. It doesn’t seem to be getting the data from the textboxes for some reason, and I can’t understand why at all. Here’s the snippet of code where I try to get the data from the textbox.

Code:
Dim itemValue = CType(e.Item.FindControl("txtBoxItem_Value"), TextBox).Text
Dim itemComments = CType(e.Item.FindControl("txtBoxItem_Comments"), TextBox).Text

That should work, but it doesn’t. Anyone have any ideas?

 
I remember having to do something like that, and for some reason the way I got it to work was something like:

Dim textBox as new TextBox
Dim value as string

textBox = e.Item.FindControl("txtBoxItem_Value")
value = textBox.text

Strange though that your code wouldn't work...it looks right...

D'Arcy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top