Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GridView data from nonVisible cols
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
GridView data from nonVisible cols
Versions des environnements
Environment:
ASP.NET
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01376604
Message ID:
01376604
Vues:
54
I have a link in my gridview for edit.

I catch that in the _RowCommand()

I get the row played with, and I can see the data in the various columns displayed in the grid just fine. I have visible=false for the columns that hold the IDs for the 4 tables I need to play with.

Those columns data comes back as "" when I am either in the debuger or app presenting those #s to labels on the page.

CODE:
int row = Convert.ToInt32(e.CommandArgument);
GridViewRow gdrow = GridView1.Rows[row];
// Grab the ids for the tables
// DataKeyNames="MID,STID,ContractID,CIID"
int ciid = 0, mid = 0, contractid=0, stid = 0;

// this is where I should pick up the data I want
mid = gdrow.Cells[10].Text

but the gdrow.Cells[10].Text ="" in the debugger.

Anyone seen this and have the workaround?

TIA
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform