c# winform DataGridView双击某一行的事件,双击表头或列头不允许有操作

private void dataGridView1_[color=red]CellDoubleClick[/color](object sender, DataGridViewCellEventArgs e)
{
	if ([color=red]e.RowIndex > -1 && e.ColumnIndex > -1[/color])//双击表头或列头时不起作用
	{
		MessageBox.Show("ok");
	}
}


黑色头发:http://heisetoufa.iteye.com

你可能感兴趣的:(C++,c,C#,WinForm)