开发者

get single primary key value from datagridview in c# windows forms

开发者 https://www.devze.com 2023-02-02 20:06 出处:网络
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 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 property


It 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...

0

精彩评论

暂无评论...
验证码 换一张
取 消