Set Focus
ASP.NET
2
Posts
2
Posters
0
Views
1
Watching
-
I am using a footer of a datagrid to add a row. After adding I want to set the focus on the first control of the footer.How can I achieve this.The following code is not working: protected void gdViewCompliance_ItemCommand(object source, DataGridCommandEventArgs e) { if (e.CommandName == "Add") { Some code here ((TextBox)e.Item.FindControl("txtFtExeName")).Focus() } }
-
I am using a footer of a datagrid to add a row. After adding I want to set the focus on the first control of the footer.How can I achieve this.The following code is not working: protected void gdViewCompliance_ItemCommand(object source, DataGridCommandEventArgs e) { if (e.CommandName == "Add") { Some code here ((TextBox)e.Item.FindControl("txtFtExeName")).Focus() } }