We have added an improvement to JavaScript IntelliSense for our ASP.NET MVC controls. We have added a cast method to the client API that lets you use the client-side reference of ASP.NET MVC controls as typed objects.
This provides two major advantages:
This feature is available starting with build:
Follow the steps from documentation to import and reference type definition files. The new language service of VS2017 enables JavaScript IntelliSense with type definition file.
Follow these one-time steps:
Let's compare the previous approach and the new cast method.
When using the getControl method of Control, the API didn't include much IntelliSense. For example, if we want to attach itemFormatter event to grid, we did not get much help with auto-completion or API information in the VS Code editor:
var fg=wijmo.grid.FlexGrid.cast("#fg");
With this feature, we don't only get code completion; we also get rich information about the event within the code editor:
This immensely improves writing client-side scripts when using ASP.NET MVC controls and speeds up development.