ParamQuery grid support forum

General Category => ParamQuery Pro Evaluation Support => Topic started by: tqmatheson on May 15, 2020, 10:59:48 pm

Title: Using ParamQuery grid in Angular - Refresh causes javascript errors
Post by: tqmatheson on May 15, 2020, 10:59:48 pm
I have so far been unable to make a simple grid refresh to work when attempting to render ParamQuery grid in an Angular 9 application.

I can successfully run all of the example Angular application examples that are provided on the ParamQuery web site (like https://paramquery.com/pro/demos/ng_switch_data).  What I want to do is something slightly more involved, and is not shown in the samples.  This is modifying the dataModel of a ParamQuery grid, and executing a "refresh" or  "refreshDataAndView" on the grid.  Is this capability supported if the grid is being used in an Angular application?  Is there any reference implementation that can be made available that refreshes grid data, in an angular app?

Following is the javascript error they I see:
ERROR TypeError: Cannot read property 'length' of undefined
    at push../node_modules/pqgrid/pqgrid.min.js.t.paramquery.cRefresh.addRowIndx (pqgrid.min.js:12)
    at $.<computed>.<computed>.<anonymous> (pqgrid.min.js:12)
    at n (pqgrid.min.js:9)
    at $.<computed>.<computed>.push../node_modules/pqgrid/pqgrid.min.js.e._trigger (pqgrid.min.js:9)
    at $.<computed>.<computed>.push../node_modules/pqgrid/pqgrid.min.js.a.refreshDataFromDataModel (pqgrid.min.js:10)
    at $.<computed>.<computed>.push../node_modules/pqgrid/pqgrid.min.js.a.refreshView (pqgrid.min.js:10)
 
Many thanks!
Title: Re: Using ParamQuery grid in Angular - Refresh causes javascript errors
Post by: paramvir on May 18, 2020, 09:26:55 am
All the features and API are supported in Angular applications.

Could you please share a stackblitz of the issue faced by you.