Retreive values from invisible cell

Discussion in 'ASP .Net Datagrid Control' started by Patrice COTE via .NET 247, Nov 17, 2004.

  1. Hi !

    I'm trying to update a table with an editable DataGrid (Edit,Update, Cancel button). In the Update event of the item, I canretreive every value by using the TableCell object(DataGridCommandEventArgs.Item). The only value I can' retreiveis the one that I stored in an invisible cell.

    Here's a sample code :

    protected void ItemsGrid_Update(object sender,DataGridCommandEventArgs e)
    {
    //We have to look for the inner control (TextBox) becausewe're in
    //edit mode and every cell is filled with a TextBox
    string strNumLigne = e.item.Cells[0].Controls[0].Text;
    }

    If the Cell is Visible, it works fine, but if it's not, I alwaysget "". Does anybody knows how could I get the value of thisinvisible cell ?


    --------------------------------
    From: Patrice COTE

    -----------------------
    Posted by a user from .NET 247 (http://www.dotnet247.com/)

    <Id>sLD27a3rAUqF7dUc/yplYA==</Id>
    Patrice COTE via .NET 247, Nov 17, 2004
    #1
    1. Advertising

  2. Hi Patrice,

    I'll take a further look into it for you but in the meantime, as a workaround, you might try to set the cell to visible and its front, back and font colour to be the
    same as the background so it blends in.

    I'll check it further,

    Michelle Hlaing

    Microsoft Support Professional

    ***Disclaimer: This posting is provided "as is" with no warranties and confers no rights.***
    --------------------
    >From: Patrice COTE via .NET 247 <>
    >X-Newsreader: AspNNTP 1.50 (Matthew Reynolds Consulting)
    >Subject: Retreive values from invisible cell
    >Mime-Version: 1.0
    >Content-Type: text/plain; charset="us-ascii"
    >Content-Transfer-Encoding: quoted-printable
    >Message-ID: <>
    >Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridcontrol
    >Date: Wed, 17 Nov 2004 01:00:56 -0800
    >NNTP-Posting-Host: 81-86-69-114.dsl.pipex.com 81.86.69.114
    >Lines: 1
    >Path: cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
    >Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.aspnet.datagridcontrol:11501
    >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.datagridcontrol
    >
    >Hi !
    >I'm trying to update a table with an editable DataGrid (Edit, Update, Cancel button). In the Update event of the item, I can retreive every value by using the

    TableCell object (DataGridCommandEventArgs.Item). The only value I can' retreive is the one that I stored in an invisible cell.
    >Here's a sample code :
    >protected void ItemsGrid_Update(object sender, DataGridCommandEventArgs e)
    >{
    > //We have to look for the inner control (TextBox) because we're in
    > //edit mode and every cell is filled with a TextBox
    > string strNumLigne = e.item.Cells[0].Controls[0].Text;
    >}
    >If the Cell is Visible, it works fine, but if it's not, I always get "". Does anybody knows how could I get the value of this invisible cell ?
    >--------------------------------
    >From: Patrice COTE
    >-----------------------
    >Posted by a user from .NET 247 (http://www.dotnet247.com/)
    ><Id>sLD27a3rAUqF7dUc/yplYA==</Id>
    >
    Michelle Hlaing, Nov 18, 2004
    #2
    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. Andy B
    Replies:
    5
    Views:
    590
    Andy B
    May 29, 2008
  2. Patrice COTE via .NET 247

    Retreive values from invisible cell

    Patrice COTE via .NET 247, Oct 17, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    123
    Eliyahu Goldin
    Oct 17, 2004
  3. Patrice COTE via .NET 247

    Retreive values from invisible cell

    Patrice COTE via .NET 247, Oct 31, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    119
    Patrice COTE via .NET 247
    Oct 31, 2004
  4. Patrice COTE via .NET 247

    Retreive values from invisible cell

    Patrice COTE via .NET 247, Dec 22, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    104
    R. Thomas, aka Xtreme.Net
    Dec 24, 2004
  5. Patrice COTE via .NET 247

    Retreive values from invisible cell

    Patrice COTE via .NET 247, Jan 23, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    107
    Jeppe Dige Jespersen
    Jan 24, 2005
Loading...

Share This Page