我在datagridview中有些数据,设想是这样:选中其中任意一个单元格,能立刻把该单元格所在行号显示出来。我写的程序如下:
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
        {
           
            int RowNum = dataGridView1.CurrentCell.RowIndex;
            textBox1.Text += "     " + RowNum;

在调试运行的时候发现有的单元格能返回,有的单元格点击之后没有反应,这是怎么一回事?