开发者

retrieve the value of datagridview inside the panel in splitcontainer

开发者 https://www.devze.com 2023-04-08 06:43 出处:网络
I have a split container control in c#. inside the right panel there is a datagridview.i havea button in panel outside the datagridview. when the button is clickedi want to get the datagridview\'s sel

I have a split container control in c#. inside the right panel there is a datagridview. i have a button in panel outside the datagridview. when the button is clicked i want to get the datagridview's selected row value开发者_开发知识库. how to do it?


For example

dataGridView.SelectedRows[0].DataBoundItem 

or

dataGridView.SelectedRows[0].Cells[x].Value 

where x is the column index

or

sensorDataGridView.CurrentCell.Value
0

精彩评论

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

关注公众号