Unable to change set with AJAX calendar extender/selectedvalue property

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bellgodz
    New Member
    • Jun 2008
    • 3

    Unable to change set with AJAX calendar extender/selectedvalue property

    Hello,

    I have a text box on an .aspx page that an AJAX calendar extender is tied to. When this page is loaded the text box in question is populated with a date from a selected record. I've tried using the "SelectedVa lue" property of the calendar extender to populate this text box, but what happens is this text box retains the focus after the page is loaded, which causes the calendar from the calendar extender to appear. I do not want this text box to have the focus on page load. I've tried using javascript and code in my code-behind fine to set the focus to another control but neither of these methods work. Does anyone have a solution to this?

    Thanks in advance.

    PS I'm using the following:
    Visual Studio 2005/C#
    AJAX Control Toolkit 1.0.20229.0
    System.Web.Exte nsions 1.0.61231.0
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Find the code which sets the focus to the text box. It'll be set using the focus() method. Can you show the code that you've tried, or some relevant code, e.g. the control that you're trying to set the focus to (please post the client-side code [view source in the browser], not .NET code).

    One question I'd like to ask though: why does setting the focus on the text box cause the calendar to appear?

    Comment

    Working...