DotNetNuke.UI.Utilities.
ClientAPI.RegisterKeyCapture((TextBox)UserGrid.HeaderRow.FindControl("TextBoxFilterUsername"), (TextBox)UserGrid.HeaderRow.FindControl("ImageButtonFilterUsername"), Constants.EnterAscii);
I have an ASP page with a gridview and in that gridview is a TemplateField, now On my site I have a problem with the sign out button always having the focus, what I would like to have happen is when a user types in a textbox the focus switches to the imagebutton so when the user presses enter it doesn't automatically sign them out. I have tried putting the following call into the Page_Load event but it does not work, I am unsure if that is because the FindControl method is not meant to be used here, in which case I have no other way to refrence my controls, below you can cee some of the file where the controls I need exist. Can some one please help me to get this code working
cheers
<
asp:GridView ID="UserGrid" runat="server" BackColor="#E9EAFE" GridLines="None" Width="100%"
AutoGenerateColumns="False" OnRowDataBound="GridViewUser_RowDataBound" OnRowCommand="GridViewUser_RowCommand">
<Columns>
<asp:TemplateField>
<HeaderTemplate>
<asp:Label ID="LabelGridHeaderUserName" runat="server" ForeColor="#CE0000"></asp:Label>
<asp:TextBox ID="TextBoxFilterUsername" Columns="10" runat="server"></asp:TextBox>
<asp:ImageButton ID="ImageButtonFilterUsername" ImageUrl="~/DesktopModules/MaxSec/images/search.gif"
OnClick="ImageButtonFilter_Click" runat="server" />
 
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="lblUsername" runat="server" Text='<%# Bind("UserName") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>