Datagrid embedded textbox text fill on postback

Discussion in 'ASP .Net' started by Peppie, Jun 1, 2005.

  1. Peppie

    Peppie Guest

    Hi,

    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?

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


    Thanks, Peppie
     
    Peppie, Jun 1, 2005
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    3
    Views:
    940
    George Ter-Saakov
    Feb 23, 2007
  2. John Walker
    Replies:
    2
    Views:
    415
    John Walker
    Dec 28, 2007
  3. Fabio Mastria
    Replies:
    5
    Views:
    4,720
    TechMCAD13
    Jan 30, 2008
  4. zhixuen
    Replies:
    0
    Views:
    1,358
    zhixuen
    Feb 10, 2009
  5. Elroyskimms

    Accessing Textbox Text After Postback in Dynamic Control

    Elroyskimms, Feb 20, 2006, in forum: ASP .Net Building Controls
    Replies:
    3
    Views:
    656
    Jose Rodriguez
    Feb 22, 2006
  6. Thomas Dodds

    Databind an embedded control in an embedded datagrid

    Thomas Dodds, Jul 26, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    589
    Thomas Dodds
    Jul 26, 2004
  7. News User

    textbox text missing after detailsview postback?

    News User, Jul 31, 2006, in forum: ASP .Net Datagrid Control
    Replies:
    2
    Views:
    590
    Eliyahu Goldin
    Jul 31, 2006
  8. agb

    writing two textbox's text in one textbox

    agb, Aug 26, 2003, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    271
    Ken Cox [Microsoft MVP]
    Aug 27, 2003
Loading...