点击删除时可以获得该行的标题    
        
                   怎样获得???

解决方案 »

  1.   

    在GridView1中有三列   第一列是标题  第二列是时间 第三列是CommandField  删除   我想单击该行的删除时获得该行的标题   
      

  2.   


            private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
            {
                if (e.RowIndex >= 0)
                {
                    DataGridViewColumn column = dataGridView1.Columns[e.ColumnIndex];
                    if (e.ColumnIndex==3 )
                    {
                        string str_标题 = this.dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString();
                        MessageBox.Show(str_标题);
                    }
                }
            }
      

  3.   

    在删除事件中写:
     string str_标题 = this.dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString();
      

  4.   


                Label aa = (Label)gvShow.Rows[0].FindControl("lblCLLBIE");
                this.Label1.Text = aa.Text;这样试一下看看行不行??
      

  5.   


    e.ColumnIndex == 2 是从第0列开始计算的。