|
-
May 8th, 2007, 02:31 AM
#1
Thread Starter
Lively Member
datagrid selected row values
How to retrieve data from the selected row in datgrid. It is a single selection. So only one row will be selected
-
May 8th, 2007, 03:11 AM
#2
Re: datagrid selected row values
Is this grid bound to a DataTable by chance?
-
May 9th, 2007, 08:46 AM
#3
Thread Starter
Lively Member
Re: datagrid selected row values
Sorry for not replying sooner.
Well, I was using Visual Studio 2005, and then happened to use 2003 later. Thats where I got stuck....since CurrentCell is not available in it.
Anyway, I will not be using 2003 anymore, but it would be useful...to know how to retrieve a row's values using VS 2003. . That is without using CurrentCell.
-
May 9th, 2007, 09:46 AM
#4
Re: datagrid selected row values
If you're not using 2003 any more then it can't be useful to know, but maybe interesting. You use the CurrentRowIndex to get a DataRowView from the DefaultView of the bound DataTable, e.g.
VB.NET Code:
Dim row As DataRowView = myDataTable.DefaultView(myGrid.CurrentRowIndex)
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
|