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. Advertising

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. Kathy Burke
    Replies:
    1
    Views:
    1,123
    Severin
    Nov 10, 2003
  2. Islam Elkhayat

    Fill TextBox with DataReader...

    Islam Elkhayat, Nov 22, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    5,334
    Saravana
    Nov 22, 2004
  3. Replies:
    1
    Views:
    570
    Jacek Stawicki
    Jul 23, 2006
  4. Fabio Mastria
    Replies:
    5
    Views:
    4,344
    TechMCAD13
    Jan 30, 2008
  5. Thomas Dodds

    Databind an embedded control in an embedded datagrid

    Thomas Dodds, Jul 26, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    397
    Thomas Dodds
    Jul 26, 2004
Loading...

Share This Page