Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GridView data from nonVisible cols
Message
General information
Forum:
ASP.NET
Category:
Other
Title:
GridView data from nonVisible cols
Environment versions
Environment:
ASP.NET
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01376604
Message ID:
01376604
Views:
47
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
Next
Reply
Map
View

Click here to load this message in the networking platform