RadDatePicker and RadAjaxManager1.FocusControl

4 posts, 0 answers
  1. Matthew Johnson
    Matthew Johnson avatar
    10 posts
    Member since:
    Oct 2009

    Posted 12 Apr 2010 Link to this post

    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???

  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 13 Apr 2010 Link to this post

    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.
  3. Matthew Johnson
    Matthew Johnson avatar
    10 posts
    Member since:
    Oct 2009

    Posted 13 Apr 2010 Link to this post

    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

     

  4. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 14 Apr 2010 Link to this post

    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.
Back to Top