RadDatePicker not exist in code behind

6 posts, 0 answers
  1. Brew Hutch
    Brew Hutch avatar
    56 posts
    Member since:
    Apr 2010

    Posted 12 Jan 2011 Link to this post

    I'm trying to use RadDatePicker in Visual Web Part. The problem was when I tried to call it in .vb (let's say its ID is radDate1), it did not exist in IntelliSense. Seeming like it's not recognized. 

    TestWebPart.ascx

    ..
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
            <telerik:RadDatePicker ID="radDate1" Runat="server" AutoPostBack="false">                           
                <DateInput DateFormat="MM/dd/yyyy" />                   
            </telerik:RadDatePicker>
    ..

    TestWebPart.ascx.vb

    Private
    Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
         radDate1  <--- not found in IntelliSense
    End Sub

    web.config
    <SafeControls>
    ...
    <SafeControl Assembly="Telerik.Web.UI, Version=2010.1.309.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" Namespace="Telerik.Web.UI" TypeName="*" Safe="True" SafeAgainstScript="False" />
    ...
    </SafeControls>
    ...
    <assemblies>
    ...
    <add assembly="Telerik.Web.UI, Version=2010.1.309.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" />
    ...
    </assemblies>

    Please advise

    Thanks
    Brew

  2. Tsvetoslav
    Admin
    Tsvetoslav avatar
    1823 posts

    Posted 13 Jan 2011 Link to this post

    Hello Brew,

    The absence of IntelliSense is not an expected behavior. Make sure that your project has the necessary reference to the telerik dll, build the project and try again.

    Regards,
    Tsvetoslav
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  3. Brew Hutch
    Brew Hutch avatar
    56 posts
    Member since:
    Apr 2010

    Posted 13 Jan 2011 Link to this post

    I found a solution. I manually added this line in .ascx.designer.vb

    Protected WithEvents radDate As Global.Telerik.Web.UI.RadDatePicker

    It's weird that vs2010 will not add it automatically after the Visaul Web Part control has been created.

    Any idea?
  4. Bob
    Bob avatar
    10 posts
    Member since:
    Jun 2010

    Posted 21 Jan 2013 Link to this post

    I am having the same problem on Visual Studion 2012.  I have removed and readded the telerik dll references and still keeps happening.  It is only with the RadDatePicker control.  Sometimes if I manually add the line Protected WithEvents radDate As Global.Telerik.Web.UI.RadDatePicker to the .ascx.designer.vb file it works, but then the line disappears when that file is updated.  I am using the latest release of the teleik controls version number: 2012.3.1308.40

    Thanks,
    Bob

  5. Tsvetoslav
    Admin
    Tsvetoslav avatar
    1823 posts

    Posted 24 Jan 2013 Link to this post

    Hello Bob,

    Is your set-up under SharePoint 2010 or outside of it?


    Regards, Tsvetoslav
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  6. Bob
    Bob avatar
    10 posts
    Member since:
    Jun 2010

    Posted 25 Jan 2013 Link to this post

    It is in a User Control in web forms project. I am sorry when I read this post I did not realize the forum that I was in. I update the control suite using the Control Panel application and the problem has not reoccurred.
Back to Top