Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 919
kpfishon Avatar asked Dec 06 '13 18:12

kpfishon


1 Answers

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.

like image 125
Milan Jaros Avatar answered Oct 06 '22 13:10

Milan Jaros