Hi to all...
Kindly provide me some help w/ my problem.
I have a gridview w/ a fixed the header row inside a div tag, each data row has an Edit link. When the Edit link is clicked, I display a textbox on the selected row (via edittemplate of the gridview) so the user can change value.
If the user clicks a row that is found at the bottom of the grid, i'd like to set focus to that textbox on the selected row, or at least scroll to that row inside the div tag.
I'm using this code to set focus on the selected row:
protected void grvTasks_RowDataBound(object sender, GridViewRowEventArgs e)
{
TextBox txtTask = e.Row.FindControl("txtTask") as TextBox;
if (txtTask != null) txtTask.Focus();
}
The gridview focuses on the row, that is fine, however, my fixed header row is being pushed out of the div tag (goes above the div tag).
What is a good way to set focus on a selected row in a gridview w/ a fixed header row inside a div tag?
Thanks in advance...