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

set focus inside hte pageview control

1 Answer 80 Views
Input
This is a migrated thread and some comments may be shown as answers.
chandrasekaran
Top achievements
Rank 1
chandrasekaran asked on 07 Mar 2009, 12:25 PM


Hi,
im having two page views. When the page loads for the first time, im able to set the focus on the first control, which is an normal text box. when im clicking an button, im loading the second page view. In this page view i need to set focus on the rad date picker.
I cannot set the focus on this control. Can anyone help me on this.
This is the code currently im using. But it is not working.

 

imgBtnContinue.Attributes.Add(

"onClick", "javascript:return setFocus()");

 

 

 

function

setFocus()

 

{

 

var txtSignUpDate = document.getElementById('<%= AddStep2PageView.FindControl("txtSignUpDate").ClientID %>')

 

txtSignUpDate.style.visibility =

"visible";

 

txtSignUpDate.focus();

}

 



Regards,
Chandru

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 10 Mar 2009, 09:15 AM
Hello Chandrasekaran,

I am sending you a small project with implementation request by you.
Please give it a try and see if it works for you.

I hope this helps.

Sincerely yours,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Input
Asked by
chandrasekaran
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or