GridView: Change selected row THEN select a control in that row
Posted on 2010-09-22
Using Visual Studio 2008...In a GridView, I want to click on a control (textbox) of a non-selected row and have THAT row become selected AND give focus to the control that was clicked. I can get this code to select the row:
e.Row.Cells[colseqClientName].Attributes["onclick"] = ClientScript.GetPostBackClientHyperlink(this.GridViewSearchResults, "Select$" + e.Row.RowIndex);
But, I haven't figured out how to subsequently give the clicked textbox focus.
Is that possible?