ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: ohbayashi on March 05, 2018, 03:53:07 pm

Title: tsc error in TypeScript "widget().pqTooltip()"
Post by: ohbayashi on March 05, 2018, 03:53:07 pm
Please tell me if you have the best way to write event handling.

pqgrid ver. 5.1.0

abc.ts
Code: [Select]
/// <reference path="../../types/pqgrid.d.ts" />

namespace aaa {
    class PqgridAbc {
        public grid: pq.gridT.instance;

        constructor() {
            this.grid = pq.grid("#gridMain", this.gridObj);
        }

        public gridObj: pq.gridT.options = {
            height: "100%-10",
            width: "100%-10",
            :
            create: (evt, ui) => {
                // validation warn.
                this.grid.widget().pqTooltip();     <- error.1
        }
    }
    const pqAbc = new PqgridAbc;
}

error.1
Code: [Select]
error TS2551: Property 'pqTooltip' does not exist on type 'JQuery<HTMLElement>'. Did you mean 'tooltip'?
Title: Re: tsc error in TypeScript "widget().pqTooltip()"
Post by: paramvir on March 06, 2018, 12:20:07 am
this inside event is the grid itself

Code: [Select]
create: function(){
       this.widget().pqTooltip();
}
Title: Re: tsc error in TypeScript "widget().pqTooltip()"
Post by: ohbayashi on March 09, 2018, 02:32:48 pm
Thank you.