get single primary key value from datagridview in c# windows forms
I need to get the primary key value, or whatever key I set, from the selected row in a datagridview with out having to create a hidden column.
I want the functionality of gridview in asp.net having the DataKey开发者_如何学GoNames propertyIt really depends on how you fill the grid, but you could use the Tag
property of the DataGridViewRow
to hold your row key.
Tag
property can hold any object so you can set it to whatever you desire...
精彩评论