Use RadWindow Content Template as Login and Set Focus

3 posts, 0 answers
  1. Seth
    Seth avatar
    66 posts
    Member since:
    Oct 2009

    Posted 03 May 2010 Link to this post

    I am trying to use the ContentTemplate feature of the RadWindow for a login form and it works just fine, however I am wondering how I set focus to the text box in the window.  I am using the asp:Login control and I tried using the defaultfocus attribute of the form tag to set it but it didn't work out as I expected.

    TIA
  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 05 May 2010 Link to this post

    Hi Seth,

    Please find attached a small sample that shows what I would suggest in such scenario. Basically, the idea is to use the OnClientShow event handler of the window and in it, to find the UserName control in the asp:login one. Once you get a reference to its client-side object, you can call its focus() method.

    Sincerely yours,
    Georgi Tunev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. Seth
    Seth avatar
    66 posts
    Member since:
    Oct 2009

    Posted 05 May 2010 Link to this post

    That worked perfectly, thank you.
Back to Top