datagrid view single cell click

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Syed Hadi
    New Member
    • Dec 2012
    • 56

    datagrid view single cell click

    i want a single cell click function... but when i am pressing anywhere in the datgridview this cell[1] is working ... how to use single cell..in dgv
    Code:
      
    private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
            {
                //if (dataGridView1.Rows[1].Cells[1] == null )
                //{
                dataGridView1.Rows[1].Cells[1].Value = 1;
                //}
    
            }
Working...