I have a dataGridView and I need that when the user clicks on any cell the whole row that contains this cell is selected too. (it has multiselect disbaled)
I t
Could do something like this
protected override void Render(HtmlTextWriter writer)
{
foreach (GridViewRow row in Results.Rows)
{
if (row.RowType == DataControlRowType.DataRow)
{
row.Attributes["onmouseover"] = "this.style.cursor='pointer';";
row.CssClass = "rowHover";
row.ToolTip = "Click row to view person's history";
row.Attributes.Add("onclick", this.ClientScript.GetPostBackClientHyperlink(this.Results,"Select$" & r.RowIndex , true));
}
}
base.Render(writer);
}