0
我在c#中有一個拆分容器控件。在右側面板中有一個datagridview。 datagridview外的面板中有一個按鈕。當按鈕被點擊時,我想獲取datagridview的選定行值。怎麼做?檢索splitcontainer中面板內的datagridview的值
我在c#中有一個拆分容器控件。在右側面板中有一個datagridview。 datagridview外的面板中有一個按鈕。當按鈕被點擊時,我想獲取datagridview的選定行值。怎麼做?檢索splitcontainer中面板內的datagridview的值
例如
dataGridView.SelectedRows[0].DataBoundItem
或
dataGridView.SelectedRows[0].Cells[x].Value
其中x是列索引
或
sensorDataGridView.CurrentCell.Value