protected void OnRowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == ("Show")) { int index = Convert.ToInt32(e.CommandArgument); //this will get rowid from gridview GridViewRow row = gridCalls.Rows[index]; txt1.Text = row.Cells[2].ToString(); // second column in the sql server database } }
txt1.Text = row.Cells[2].Text;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)