C# DataGridView 代码实现选中一行数据

来源:互联网 发布:仓管软件免费版 编辑:程序博客网 时间:2024/05/30 23:35

                 首先设置 DataGridView 的 SelectionMode 属性的值为:FullRowSelect。


                DataGridViewRow row = dgvQueryResult.Rows[info.RowIndex];
                row.Selected = true;
                dgvQueryResult.CurrentCell = row.Cells[0];

0 0