110,534
社区成员
发帖
与我相关
我的任务
分享
dg1.Rows[0].Selected =false;
dg1.ClearSelection();
dg1.CurrentCell =null;
private void Form1_Activated(object sender, EventArgs e)
{
dataGridView1.CurrentCell = null;
}
dataGridView1.CurrentCell = null;
private void dataGridView1_DataSourceChanged(object sender, EventArgs e)
{
if (dataGridView1.SelectedCells.Count > 0)
{
foreach (DataGridViewCell cell in dataGridView1.SelectedCells)
{
cell.Selected = false;
}
}
}