Retreive values from invisible cell

  • Thread starter Patrice COTE via .NET 247
  • Start date
P

Patrice COTE via .NET 247

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 ?
 
M

Michelle Hlaing

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 <[email protected]>
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: <[email protected]>
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 ?
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,266
Messages
2,571,082
Members
48,773
Latest member
Kaybee

Latest Threads

Top