Problems with DatePicker inside a WebUserControl

7 posts, 0 answers
  1. FELIX MELENDEZ
    FELIX MELENDEZ avatar
    2 posts
    Member since:
    Sep 2009

    Posted 17 Sep 2009 Link to this post

    Hi there,

    I'm testing ASP.NET AJAX UI Controls and specially the DatePicker.  I have two Date Pickers in a web user control. Then I have a content page onto which I place the aforementioned web user control. As you might guess this last content page has its master page. So the hierarchy is as follows

    master page
       content page
          web user control (this one has the 2 date pickers)

    Question:
    Why when I want to access my web page, I see both date pickers rendered but as soon as I clic on the date icon a JavaScript error shows in the left-lower browser's corner. I've been investigating the reason for this with no success :-(..

    Please if some one could shed some light on this (show some code example).
    Felix

  2. Mira
    Admin
    Mira avatar
    1124 posts

    Posted 23 Sep 2009 Link to this post

    Hi FELIX,

    I made a sample project for you implementing your scenario. It is working fine on my side - no errors are shown. Please take a look at it and tell me whether it works for you.

    Greetings,
    Mira
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. FELIX MELENDEZ
    FELIX MELENDEZ avatar
    2 posts
    Member since:
    Sep 2009

    Posted 23 Sep 2009 Link to this post

    Mira,

    Thanks for answering my email. I looked at your sample you sent me and indeed it gives no error but it's not what I want. I'd like to attach the same solution you sent me where I added my error as well (so that you can take a look at it). But... how do I attach the file to this message? I see no attach icon! :-(

    If you need more info or have any questions, please notify me asap.

    Have a nice day, and thanks for your assistance.
    Felix
  4. Mira
    Admin
    Mira avatar
    1124 posts

    Posted 25 Sep 2009 Link to this post

    Hi Felix,

    In the forums it is not allowed for customers to attach files. To send us your project please open a regular support ticket and attach the project. We will debug it locally and get back to you with our findings.

    Kind regards,
    Mira
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. Steven
    Steven avatar
    26 posts
    Member since:
    May 2009

    Posted 27 Oct 2009 Link to this post

    I have this exact same problem, was a fix found from the ticket?
  6. Steven
    Steven avatar
    26 posts
    Member since:
    May 2009

    Posted 28 Oct 2009 Link to this post

    Well I gave up using the Telerik DatePickerin the end, it doesn't seem to be usable from within my user control, definitely seems to have issues with scripts.  I tried using RegisterWithScriptManager this morning but it made no difference.

    For now I have used a calendar extender from the AjaxToolKit but I would prefer to have used the Telerik DatePicker so the application was more consistant.  Maybe when they get this bug fixed that will be possible.  I have included what I used as a work around below:

    Dim rdp = New TextBox 
    rdp.ID = ControlID 
     
    Dim rdpext = New AjaxControlToolkit.CalendarExtender 
    rdpext.ID = "CalExt" & ControlID 
    rdpext.TargetControlID = ControlID 
     
    Control.Controls.Add(rdp) 
    Control.Controls.Add(rdpext) 

  7. Felix Ruben Melendez Batres
    Felix Ruben Melendez Batres avatar
    15 posts
    Member since:
    Oct 2006

    Posted 28 Oct 2009 Link to this post

    Steven,

    It's good to know that some other person has gone through this problem as well. Please don't get me wrong but some times when some one reads the documentation, such samples do not reflect necessarily the same as one's problem want to solve. Instead you have to dig for more information. I can assure that RadControls are the best out there it's just a matter of "playing" with them to get to know them (but takes lot of time).
     
    Back to the issue, I had to do all the programming from the code-behind and finally got it working. I don't know but in a previous post I asked how  a customer could upload files (so that any one can peek at the code) and I had to open some "ticket", etc. Since I had the pressure to make it work, I gave it up and opted to solve the problem. But I don't know how or why, but for some reason now I'm looking at the UploadFile control so I'll post right away a sample of my solution. Hope anyone find it useful and if for some reason some one can make it better, please share it as well.

    Just 2 things to do on your part
    1) please copy the following files to the bin directory (since I got a maximum of 2MB max total size according to Telerik forums):
    Telerik.Web.UI.dll (since it's about 13MB and the solution compressed was 4MB).
    2) rename the attached file which has an extension of .jpg to .rar (and then decompress it).

    If any one has any question, please feel free to ask.

    Have a nice day to all of you,
    Felix
Back to Top