Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > Get datakey value from DataGridView
 

Get datakey value from DataGridView

How can I get the datakey value from the datagridview current row (without using the key field as a non-visible column)?

Thanks.

Juliano.net  Saturday, September 09, 2006 6:55 PM
You can always get it from the datasource. If you are bound to a data table

datatable.defaultview.item(datagridview.currentrow.index).item("DataKey")
Ken Tucker  Sunday, September 10, 2006 5:28 PM
You can always get it from the datasource. If you are bound to a data table

datatable.defaultview.item(datagridview.currentrow.index).item("DataKey")
Ken Tucker  Sunday, September 10, 2006 5:28 PM

You can use google to search for other answers

Custom Search

More Threads

• VB 6.0/ADO Data Control ??
• Connecting to MySQL Views: Unknown SQL Type
• Update, delete and query form
• What is the minimum effort manner for renaming a DataSource object and its references?
• Bind winform object
• BindingSource and program set value
• datagrid column
• object databinding - combobox lookup
• how to dynamic bind the Combo to DataGrid?
• TableAdapter Syntax