Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Accessing the textbox when user edits text in datagrid.

Reply
Thread Tools

Accessing the textbox when user edits text in datagrid.

 
 
Rod
Guest
Posts: n/a
 
      03-07-2007

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.








 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FormView doesn't store any edits =?Utf-8?B?U2NvdHQgYXQgQ2VkYXIgQ3JlZWs=?= ASP .Net 2 02-11-2006 01:58 PM
Form edits Garry Dawkins ASP .Net 0 12-08-2003 05:03 PM
Datagrid Edits Jim Heavey ASP .Net 0 11-17-2003 01:47 PM
Registry Edits j russell Microsoft Certification 2 11-06-2003 04:14 AM
user and system.dat edits? Me here at home Computer Support 3 07-29-2003 01:24 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57