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

RadDatePicker not exist in code behind

5 Answers 62 Views
Sharepoint Integration
This is a migrated thread and some comments may be shown as answers.
Brew Hutch
Top achievements
Rank 1
Brew Hutch asked on 12 Jan 2011, 08:05 PM
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

5 Answers, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 13 Jan 2011, 11:25 AM
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.
0
Brew Hutch
Top achievements
Rank 1
answered on 13 Jan 2011, 03:48 PM
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?
0
Bob
Top achievements
Rank 1
answered on 21 Jan 2013, 04:30 PM
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

0
Tsvetoslav
Telerik team
answered on 24 Jan 2013, 02:49 PM
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.
0
Bob
Top achievements
Rank 1
answered on 25 Jan 2013, 07:30 PM
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.
Tags
Sharepoint Integration
Asked by
Brew Hutch
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
Brew Hutch
Top achievements
Rank 1
Bob
Top achievements
Rank 1
Share this question
or