This code is working. The messageBox is showing when I click any cell on the row. But I want the messageBox to show when I click on the second cell instead of full row.
<pre>private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) { object value = dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value; if (value != null && value.ToString() != string.Empty) { DataGridViewRow row = dataGridView1.Rows[e.RowIndex]; if (Convert.ToBoolean(row.Cells[pid.Name].Value) == false) { MessageBox.Show("Öncelikle geziye katılacak kişi seçilmelidir."); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)