Saturday, August 8, 2015

Row Index at grid view row command event

Row Index at grid view row command event


 protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        int arg = Convert.ToInt32(e.CommandArgument);
        int index= ((GridViewRow)(((Control)e.CommandSource).NamingContainer)).RowIndex;
    }

No comments:

Post a Comment