|
-
Sep 9th, 2010, 10:19 AM
#1
Thread Starter
Hyperactive Member
How to read data from GridView?
Okay, I have a listview (gridview) with ten columns that is bound to a dataset. The dataset is populated by a query.
I have it working so that I can select and display the data I want. Now, when the user double-clicks on a row, I want to grab the last column (contains the database key for that row) and use that to query additional data from children tables.
I grab the mouse click fine and determine what row is being looked at.
Code:
private void lvwSrch_MouseDoubleClick(object sender, MouseButtonEventArgs e)
{
int ndx = lvwSrch.SelectedIndex;
}
What I simply CANNOT figure out how to do is access the data contained in the last column. I don't want to change it (this is a read-only app, a browser), I just want to get the key value for the selected row.
Whether I get it through the dataset or the gridview doesn't matter to me... I just want to get the data. Any ideas how I can do this?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|