Q: How to get Textbox data out of a Datagrid I have a textbox used for quantity alterations in a shopping cart that is in the form of a datagrid. When i click on the edit linkbutton it allows the textbox to be altered. What I'm trying to get is the altered text to then replace the original quantity in my dataTable. I've tried a bunch of different things but can't get the changed value to stick. 
Here is the code that ultimately changes the dataTable:
       For Each objDR In myDataTable.Rows
        If objDR("ItemID") = intItemID Then
            objDR("Quantity") = Int32.Parse(myText) 'adding a specific int like 333 works
            Exit For
        End If
        Next

As noted, if i place in a specific value like "333" then the quantity changes. So the issue must rest in the textbox value not being held when i click update, or at least that is how i see it.
The code to access the textbox text I have tried:
    Dim myText As String
    For Each dataGridItem As DataGridItem In dgCart.Items
        myText = CType(dataGridItem.FindControl("txtQuantity"), TextBox).Text
       'myText = DirectCast(dataGridItem.FindControl("txtQuantity"), TextBox).Text
    Next

    have also tried
    'Dim strQuantity As String = CType(dgCart.Items(0).FindControl("txtQuantity"), TextBox).Text

and
     'Dim txtQuantity As TextBox = e.Item.FindControl("txtQuantity")

I also tried messing with the txtbox's viewstate but that makes no difference.
How do I fix this? 

A: Not sure if you want the editCommand or update event. From link in comments:
Dim tb As TextBox = CType(e.Item.Cells(3).Controls(0), TextBox)

