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

Javascript Intellisense for control

3 Answers 149 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 17 Jun 2011, 09:57 AM
Im unable to get javascript intellisense working for a specific controls client side API.

the control I'm working with right now is DateTimePicker.
how do I get javascript intelliesense to work with it?

none of these objects are available in intellisense

http://www.telerik.com/help/aspnet-ajax/calendar-client-side-rad-datetimepicker.html

I already added a reference to the core telerik javascript

<asp:ScriptManager ID="ScriptManager1" runat="server">
    <Scripts>
        <asp:ScriptReference Name="Telerik.Web.UI.Common.Core.js" Assembly="Telerik.Web.UI" />
    </Scripts>
</asp:ScriptManager>

I tried to add Name="Telerik.WebUI.Calendar.RadDateTimePicker.js" Assembly="Telerik.Web.UI" />

We have premium license and I looked in the source code and it has the vsdoc files for javascript intellisense but it doesn't work for me?

3 Answers, 1 is accepted

Sort by
0
Accepted
Daniel
Telerik team
answered on 17 Jun 2011, 10:53 AM
Hello Michael,

I just tried to reproduce this problem but had no luck. Please check the attached screenshot.

You can press CTRL + SHIFT + J to force the Visual Studio to update the Javascript intellisense.

Regards,
Daniel
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
Michael
Top achievements
Rank 1
answered on 17 Jun 2011, 12:42 PM
It doesnt work for me like it appears it should in your example
If I use

var StartTime = $find('<%= rtpStart.ClientID %>')

It doesn't work

I need to use
var picker = $telerik.findDateTimePicker('<%= rtpStart.ClientID %>');

Any Idea why that is?
0
Daniel
Telerik team
answered on 22 Jun 2011, 08:28 PM
Hello Michael,

Javascript intellisense will work properly only it the object is converted (cast) to its actual type. So in the first case you have to write something like this:
var pickerComp = $find('<%= RadDateTimePicker1.ClientID %>');
var picker = $telerik.toDateTimePicker(pickerComp);
picker...

I hope this helps.

Kind regards,
Daniel
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.

Tags
Ajax
Asked by
Michael
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Michael
Top achievements
Rank 1
Share this question
or