Definitelytyped: Property 'kendoGrid' does not exist on type 'JQuery<HTMLElement>

Created on 12 Jul 2017  路  8Comments  路  Source: DefinitelyTyped/DefinitelyTyped

I am using VSCode editor for my angular project development. VSCode intellisense is working fine with typings/kendo-ui. But, Webpack compilation failed due to the error.
Error:

"Property 'kendoGrid' does not exist on type 'JQuery"

I am using latest angular CLI for this project.

@afftee

Most helpful comment

maybe
(<any>$("#grid")).kendoGrid()
could help?

All 8 comments

@vimalraj-a As it is currently stated, it looks like an implementation-specific question rather than a definition type problem. To me, your question seems to be better suited on something like StackOverflow rather than in this repo.

As a tip: considering you're using Kendo's Grid, you'll probably have a support agreement because the grid is part of the pro edition. Telerik/Kendo support might also help you further.

This error is same for all kendo components. I have posted the stackoverflow question.
https://stackoverflow.com/questions/45074109/property-kendogrid-does-not-exist-on-type-jqueryhtmlelement

@vimalraj-a how did you fix this error? I am also facing a similar issue.

Vscode is not showing any error but webpack compilation fails.

Webpack doesn't respect typings(in my understanding). So, I created separate ts file and added

decalre var $: any

But, Above will be a problem if your work folder has jquery typings. I still don't have solution for this.

maybe
(<any>$("#grid")).kendoGrid()
could help?

@vimalraj-a

Webpack doesn't respect typings(in my understanding). So, I created separate ts file and added

decalre var $: any

But, Above will be a problem if your work folder has jquery typings. I still don't have solution for this.

sorry to say but there is a mistake

it should be

declare var $: any;

not

decalre var $: any

when I add declare var $: any; I get an error with theimport * as $ from 'jquery';statement:

[ts] Import declaration conflicts with local declaration of '$'.

@andreadompe

maybe
(<any>$("#grid")).kendoGrid()
could help?

it works for me :)
but we have to apply a less like this

-- import --
import * as $ from 'jquery';
import 'lightgallery';
import 'lg-zoom';

-- using --
ngOnInit(): void {
($('#lightgallery') as any).lightGallery();
}

yessss i am very happy .

thank you very mush sir
@andreadompe

Was this page helpful?
0 / 5 - 0 ratings