ParamQuery grid support forum

General Category => Help for ParamQuery Grid (free version) => Topic started by: mraj on December 09, 2024, 07:05:22 pm

Title: Steps needed for integrating pqGrid with Angular 14
Post by: mraj on December 09, 2024, 07:05:22 pm
Hi,

The existing sample in the website, is for angular 7 and pqgrid 3.5, when tried it to convert for the angular v14, getting error as

pq cannot find the namespace.
 
in  pqgrid.component.ts

import  { pq }    from 'pqgridf';

export class PqgridComponent implements OnInit {
  @Input() options!: object;
  grid: pq.gridT.instance ;


error TS2503: Cannot find namespace 'pq'.

18   grid: pq.gridT.instance;

           ~~

even i added the pqgridf.d.ts file

declare module 'pqgridf' {
  export const pq: any;
   
  }
added
in compiler options of tsconfig.json
 "typeRoots": [
      "node_modules/@types",
      "src/app"  // or wherever your pqgridf.d.ts is located
    ]


still i am unable to resolve the namespace,

please suggest, a way

thanks
Title: Re: Steps needed for integrating pqGrid with Angular 14
Post by: mraj on December 10, 2024, 09:25:17 am
Is it possible / a way present to integrate the Material Design Kit (1/2/3) of the angular project to the pqgrid ?