ASP.NET MVC Controls
Client Side IntelliSense Support

IntelliSense helps the developer to speed up the process of coding application by reducing typos and other common mistakes. While you are working with the client script in the typescript editor, IntelliSense helps you by displaying the objects, functions, and properties based on your current context. You can select an option from the pop-up list provided by the MVC IntelliSense to complete the code.

TypeScript IntelliSense

Check the Enable Client IntelliSense check box from the ComponentOne ASP.NET MVC Application Wizard to use IntelliSense for MVC controls in your Visual Studio application.



Once you check the Enable Client IntelliSense option, it automatically adds c1.mvc.basic.lib.d.ts to Scripts\Typings folder. Similarly, c1.mvc.finance.lib.d.ts, c1.mvc.flexsheet.lib.d.ts, c1.mvc.flexviewer.lib.d.ts, c1.mvc.multirow.lib.d.ts or c1.mvc.olap.lib.d.ts files are also automatically added to the folder, in case the user is working on Financial chart, FlexSheet, FlexViewer, MultiRow or OLAP, and have checked the Include C1 MVC Finance Library or Include C1 MVC FlexSheet Library or Include C1 MVC FlexViewer Library or Include C1 MVC MultiRow Library or Include C1 MVC Olap Library check box in the ComponentOne ASP.NET MVC Application Wizard.

Note:  In case you are using standard VisualStudio templates to create an application, you can enable TS IntelliSense in your application by including and referencing the type definition files from C:\Program Files (x86)\ComponentOne\ASP.NET MVC Edition\TsTypings location.

The Add TS File option helps you to use C1 MVC IntelliSense while working with TypeScript files. When you select the Add TS File option, it adds a .ts file to the Scripts folder that refers to the related .d.ts file.


JavaScript IntelliSense

C1Studio MVC Edition introduces JavaScript IntelliSense which enables the developers to quickly write their code for development. When you install C1 MVC Edition using the C1Studio installer, the JS IntelliSense file for MVC is automatically added to Visual Studio.

Once the JavaScript IntelliSense support is installed in your Visual Studio, it enables client side IntelliSense whenever you write script code.

Using Cast Method

The Cast method is a part of the JavaScript IntelliSense support for C1 MVC ASP.NET controls. In a TypeScript or JavaScript file, you can cast an object to other type, and then the members of the newly created type is available in the IntelliSense. Using the Cast method is helpful when you intend to use IntelliSense, while writing JavaScript code using the client-side API.

The example of using Cast method is as follows.

JavaScript IntelliSense in VisualStudio 2017

To enable JavaScript IntelliSense in VisualStudio 2017, you need to add c1.mvc.basic.lib.d.ts TypeScript file in your MVC application.

  1. From the Solution Explorer, right-click the Scripts folder, and then select Add | Existing Item.
  2. In the Add Existing Item dialog, select c1.mvc.basic.lib.d.ts from C:\Program Files (x86)\ComponentOne\ASP.NET MVC Edition\TsTypings location.
  3. To use JavaScript IntelliSenese in a JavaScript file or TypeScript file, add /// <reference path="c1.mvc.basic.lib.d.ts" /> reference in wwwroot\js\site.js file or any other js file to use IntelliSense.
    jsIntelliSense
    Similarly you can add c1.mvc.finance.lib.d.ts, c1.mvc.flexsheet.lib.d.ts, c1.mvc.flexviewer.lib.d.ts, c1.mvc.multirow.lib.d.ts or c1.mvc.olap.lib.d.ts file to use control specific IntelliSense in your application.
  1. From the Solution Explorer, expand the wwwroot section.
  2. Right-click the js folder, and then select Add | Existing Item.
  3. In the Add Existing Item dialog, select c1.mvc.basic.lib.d.ts from C:\Program Files (x86)\ComponentOne\ASP.NET MVC Edition\TsTypings location.
  4. To use JavaScript IntelliSenese in a JavaScript file or TypeScript file, add /// <reference path="c1.mvc.basic.lib.d.ts" /> reference in wwwroot\js\site.js file or any other js file to use IntelliSense.

    jsIntelliSense
    Similarly you can add c1.mvc.finance.lib.d.ts, c1.mvc.flexsheet.lib.d.ts, c1.mvc.flexviewer.lib.d.ts, c1.mvc.multirow.lib.d.ts or c1.mvc.olap.lib.d.ts file to use control specific IntelliSense in your application.

 

 


Copyright © GrapeCity, inc. All rights reserved.

Product Support Forum |  Documentation Feedback