Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Datagrid embedded textbox text fill on postback

Thread Tools

Datagrid embedded textbox text fill on postback

Posts: n/a

I have dropdown control on my form and after the onchange event I
reload a datagrid and fill a textbox embedded in a cell with the text
from the invisible next column. Unfortunately the text will not fill
on postback. The data is present in the column next to the template
column but the textbox will not be filled by the code beneath. I cast
the embedded control to a textbox and I am able to change all other
properties but the text. Any idea?

txt=(TextBox)e.Item.Cells[General.GetCellValue(dgrTexts,language.Description )].Controls[0];
if(e.Item.Cells[General.GetCellValue(dgrTexts,language.ID.ToString ())].Text
txt.Text=e.Item.Cells[General.GetCellValue(dgrTexts,language.ID.ToString ())].Text;
else txt.Text="";

Thanks, Peppie
Reply With Quote

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
<VS03>How to make the textbox text remain after postback zhixuen ASP .Net 0 02-10-2009 09:03 AM
Using callback, I fill dorpdownlist without postback but it gets empty when a postback is executed Fabio Mastria ASP .Net 5 01-30-2008 09:07 PM
1.1 vs 2.0 Textbox Control Text on Postback John Walker ASP .Net 2 12-28-2007 02:55 PM
Accessing Textbox Text After Postback in Dynamic Control Elroyskimms ASP .Net Building Controls 3 02-22-2006 04:44 PM
Databind an embedded control in an embedded datagrid Thomas Dodds ASP .Net Datagrid Control 0 07-26-2004 08:20 PM