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

RadDatePicker and RadAjaxManager1.FocusControl

3 Answers 52 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Matthew Johnson
Top achievements
Rank 1
Matthew Johnson asked on 12 Apr 2010, 05:54 PM
quick question (can't seem to find an answer by searching)


I have a raddatepicker inside an AJAX panel everything on the form works fine, but I can't seem to set focus to it from the server side.

I can set focus to a radtextbox sitting directly beside the datepicker.

on the server side

This works
RadAjaxManaer.FocusControl(txtMyRadTextbox)

this does not work
RadAjaxManaer.FocusControl(rdpMyRadDatePicker)

any suggestions???

3 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 13 Apr 2010, 09:32 AM
Hi Matthew,

In order to set the focus for the DatePicker you should use its DateInput control. For example:

RadAjaxManager1.FocusControl(RadDatePicker1.DateInput);

Let me know it this helps.



Greetings,
Maria Ilieva
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
Matthew Johnson
Top achievements
Rank 1
answered on 13 Apr 2010, 01:33 PM
Yea.... I did try that and it did not work for me.  I also tried defining an ID for the <DateInput > tag/control and defined runat="server" and didn't work either.

However, using the tip you provided (and "viewing the source" of the page) I was able to get it to work using 

RadAjaxManager1.FocusControl(rdpMyDatePicker.DateInput.ClientID &

"_text")

I was also able to the the radcombobox working using 

RadAjaxManager1.FocusControl(cboMyRadCombo.ClientID & "_input")

Thanks,

matthew

 

0
Maria Ilieva
Telerik team
answered on 14 Apr 2010, 01:49 PM
Hi Matthew,

Thank you for getting back to us.

I'm glad to hear that you were able to fix the problem.

Let us know if further assistance is needed.


Best wishes,
Maria Ilieva
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.
Tags
Calendar
Asked by
Matthew Johnson
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Matthew Johnson
Top achievements
Rank 1
Share this question
or