Go Back   Velocity Reviews > General Computer Discussion > Software
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread
Old 03-11-2009, 11:11 AM   #1
Default Get datagrid textbox value


I have bound datagrid with edit,update events. I am able to extract textbox values of datagrid in edit event but in the update event, its returning null textbox value. I want to get the value of textbox that is dynamically generated by the datagrid in update event.

TextBox txtbox = new TextBox();
txtbox = (TextBox)e.Item.FindControl(e.Item.Cells[1].Controls[0].ID);

the above code returns null value for txtbox.Text.

I also tried extracting vaues using these lines of code, but still returns null

TextBox txtbox = new TextBox();
txtbox = (TextBox)e.Item.Cells[1].Controls[0];
string lastname = txtbox.text


kanchangorak
kanchangorak is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Loading 24,000 rows into C# .net Datagrid Kagu Software 0 03-10-2009 06:51 PM
validating textbox inside datagrid susan_1516 Software 0 11-09-2008 01:29 PM
gridview textbox value refresh apdbrl1 Software 1 06-12-2008 06:29 PM
ASP.NET VB Using ItemDataBound to create textbox in datagrid rows. smi59550 General Help Related Topics 0 01-18-2008 07:42 PM
How do find out if a button was clicked before the textchanged event of textbox fires Jack General Help Related Topics 0 10-27-2006 10:19 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

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