I have two GridView (Master/detail) controls on the same page. I want to be able to populate the second GridView when I click on each row in first GridView without
showing the Select button or ID field on the first GridView. I have used RowDataBound event to make each rows selectable as follows but I can not get the value of ID field. Is anyone has an idea how should I approch this. Mant thanks in advance for your help.
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
if (e.Row.RowType == DataControlRowType.DataRow)
e.Row.Attributes["onmouseover"] = "this.style.cursor='hand';this.style.BackColor='Yellow';";
e.Row.Attributes["onmouseout"] = "this.style.BackColor='red';";
e.Row.Attributes["onclick"] = ClientScript.GetPostBackClientHyperlink(this.GridView1, "Select$" + e.Row.RowIndex);