This is a migrated thread and some comments may be shown as answers.

Use RadWindow Content Template as Login and Set Focus

2 Answers 115 Views
Window
This is a migrated thread and some comments may be shown as answers.
Seth
Top achievements
Rank 1
Seth asked on 03 May 2010, 01:32 PM
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 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 05 May 2010, 12:15 PM
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.
0
Seth
Top achievements
Rank 1
answered on 05 May 2010, 05:43 PM
That worked perfectly, thank you.
Tags
Window
Asked by
Seth
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Seth
Top achievements
Rank 1
Share this question
or