dataGridView 使用鼠标单击获得数据写入textbox控件中
更新:HHH   时间:2023-1-7


private void dataGridView1_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)

        {

            textbox.Text = dataGridView1.CurrentRow.Cells[0].Value.ToString();/*获得鼠标选取行的第一列数据*/

           }


返回编程语言教程...