Vikas Ahlawat

Vikas Ahlawat

  • NA
  • 564
  • 807.8k

Gridview index problem,how excess editing row index?

Oct 16 2010 12:32 AM
I have write this code
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
    {
      
       
        string rowindex = Convert.ToString(GridView1.Rows[GridView1.SelectedIndex].Cells[1].Text);   //there i find that GridView1.SelectedIndex value always -1
        //string s = Convert.ToString(GridView1.Rows[e.RowIndex].Cells[1].Text);     //i try this but when i try to write rowindex then it not appear.
        Response.Write("<script>alert('" + rowindex + "')</script>");
        ModalPopupExtender1.Show();
    }

So how excess index?

Answers (1)