Author Topic: Refresh method ("RefreshDataAndView") Only works once? Uncaught TypeError  (Read 3344 times)

vitroz

  • Newbie
  • *
  • Posts: 3
    • View Profile
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?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
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.

vitroz

  • Newbie
  • *
  • Posts: 3
    • View Profile
Thanks a lot for the reply, I'll provide the jfiddle tomorrow at last!

vitroz

  • Newbie
  • *
  • Posts: 3
    • View Profile
Sorry about that, I found out that there was a logic error on my code.
« Last Edit: June 05, 2015, 06:51:31 pm by vitroz »