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 DataKeyNames property
I need to get the primary key value, or whatever key I set, from
Share
It really depends on how you fill the grid, but you could use the
Tagproperty of theDataGridViewRowto hold your row key.Tagproperty can hold any object so you can set it to whatever you desire…