'JqGrid' property does not exist on 'JQuery' type value

advertisements

I am using Typescript with jqGrid and jQuery.

On the following line:

jQuery(this).jqGrid('editGridRow', rowid, {
    ...

I get the message:

The property 'jqGrid' does not exist on value of type 'JQuery'.

Any ideas on how to correct this problem?


I suppose that you use jquery.TypeScript.DefinetlyTyped NuGet Package.

In that case add file ~/Scripts/typings/custom.d.ts with following content:

/// <reference path="jquery/jquery.d.ts"/>
interface JQuery { jqGrid: any; }


Update: Above solution is general and works in all cases. Better solution is to...

Install jqgrid.TypeScript.DefinitelyTyped NuGet Package.