R
Rod
I want to be able to access the text in an edit text box which appears when
editting a row in a datagrid
Now I know that if you have a button column then you can do it like this.
Sub UpdateGridData(ByVal Sender As Object, ByVal E As
DataGridCommandEventArgs)
Dim objTextBox As TextBox
objTextBox = E.Item.FindControl("edit_title")
Dim strTitle As String = objTextBox.Text
However I want to use a single button which is not part of the datagrid.
I had hoped to do it like this
Private Sub btnUpdateSelectedRow_Click(........
Dim objTextBox As TextBox
objTextBox = myDataGrid.FindControl("edit_title")
but this just returns nothing
If it helps I know the datagrid's EditItemIndex as this has been put into a
viewstate
Any clues please.
PS. This system will only have a few users so efficiency is not a big
consideration.
editting a row in a datagrid
Now I know that if you have a button column then you can do it like this.
Sub UpdateGridData(ByVal Sender As Object, ByVal E As
DataGridCommandEventArgs)
Dim objTextBox As TextBox
objTextBox = E.Item.FindControl("edit_title")
Dim strTitle As String = objTextBox.Text
However I want to use a single button which is not part of the datagrid.
I had hoped to do it like this
Private Sub btnUpdateSelectedRow_Click(........
Dim objTextBox As TextBox
objTextBox = myDataGrid.FindControl("edit_title")
but this just returns nothing
If it helps I know the datagrid's EditItemIndex as this has been put into a
viewstate
Any clues please.
PS. This system will only have a few users so efficiency is not a big
consideration.