Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Gridview
Message
From
23/02/2006 22:35:33
 
 
To
23/02/2006 15:29:54
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, United States
General information
Forum:
ASP.NET
Category:
Other
Title:
Miscellaneous
Thread ID:
01098662
Message ID:
01098765
Views:
10
This message has been marked as the solution to the initial question of the thread.
Hi, Jerry

There are probably a number of ways to handle this. Here's what I'm doing.

In the ASP.NET GridView, there's a property called DataKeyNames. You can set that to your ID column name.

In the gridview's SelectedIndexChanged event (which fires if you have any link or command button with a command name of "SELECT"), you can do this...
int MyID = (int)this.grdThisWeek.SelectedDataKey.Values["MyIDColumn"];
Let me know if that helps.

Kevin
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform