ParamQuery grid support forum

General Category => Help for ParamQuery Grid (free version) => Topic started by: vitroz on June 03, 2015, 08:55:37 pm

Title: Refresh method ("RefreshDataAndView") Only works once? Uncaught TypeError
Post by: vitroz on June 03, 2015, 08:55:37 pm
Hi guys!
So, Im getting all my JSON Data and displaying it correctly on the grid.

The problem im having occurs when I am testing my filters functions.

When I select an option from a dropdown menu, the filter perfoms a search in the JSON array and returns an array with only the values I want, and then I use $grid.pqGrid("refreshDataAndView"); to display the new array on the grid. It works like a charm.

Although, If I try to select another option from the same dropdown menu, when the code reaches the point of refreshing and showing the new array with other values. I get an Uncaught TypeError: Cannot read Property 'hidden' of undefined.

Has anyone faced this issue before?
Title: Re: Refresh method ("RefreshDataAndView") Only works once? Uncaught TypeError
Post by: paramvir on June 03, 2015, 09:34:51 pm
refreshDataAndView can be used any number of times.

From the error message it looks like there is dataIndx missing somewhere.

Could you share jsfiddle so that I could look into it.
Title: Re: Refresh method ("RefreshDataAndView") Only works once? Uncaught TypeError
Post by: vitroz on June 04, 2015, 12:04:36 am
Thanks a lot for the reply, I'll provide the jfiddle tomorrow at last!
Title: Re: Refresh method ("RefreshDataAndView") Only works once? Uncaught TypeError
Post by: vitroz on June 05, 2015, 05:32:24 pm
Sorry about that, I found out that there was a logic error on my code.