public frmMainWindow() { InitializeComponent(); dataGridView1.Rows.Add(7); dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect; }
<pre lang="cs">private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) { if (dataGridView1.CurrentCell.Value == null) { dataGridView1.ClearSelection(); }
private void dataGridView1_SelectionChanged(object sender, EventArgs e) { if (dataGridView1.CurrentCell.Value == null) { dataGridView1.ClearSelection(); } }
For(int i =0;i< this.dataGridView1.CurrentRow.Cells.Count;i++)//Some thing like this .Count or .Length { if(this.dataGridView1.CurrentRow.Cells[i].Value == null) }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)