Author Topic: Error coming when re render the Pivot  (Read 2418 times)

resolvecomputing

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 40
    • View Profile
Error coming when re render the Pivot
« on: March 03, 2018, 01:46:25 pm »
I have tried Pivot, and have tried update structure and data, but when re render, the error message coming and can not re render "Uncaught use groupOption() to set groupModel options."
Can you help me solve this bug.
Thanks!

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6298
    • View Profile
Re: Error coming when re render the Pivot
« Reply #1 on: March 05, 2018, 10:16:36 am »
This error is thrown when attempt to made to set groupModel options directly through option() method.

You need to use Group().option() method to set groupModel options.

https://paramquery.com/pro/api#method-Group

resolvecomputing

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 40
    • View Profile
Re: Error coming when re render the Pivot
« Reply #2 on: March 05, 2018, 01:26:31 pm »
I had define dataModel,colModel,groupModel
and tried update and re render
$( "#pivot" ).pqGrid( "Group" ).option(groupModel);
$( "#pivot" ).pqGrid( "option" , "dataModel", dataModel );
$( "#pivot" ).pqGrid( "option" , "colModel", colM );
$( "#pivot" ).pqGrid('refreshDataAndView');
And error coming: "pqgrid.min.js:17 Uncaught TypeError: Cannot set property 'summary' of undefined"

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6298
    • View Profile
Re: Error coming when re render the Pivot
« Reply #3 on: March 05, 2018, 04:27:01 pm »
Please check the dataIndx and groupCols sub-options in groupModel. They should be present in colModel, otherwise error may occur.

resolvecomputing

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 40
    • View Profile
Re: Error coming when re render the Pivot
« Reply #4 on: March 06, 2018, 12:46:13 pm »
I have checked, but structure is correct, but I don't know why error coming.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6298
    • View Profile
Re: Error coming when re render the Pivot
« Reply #5 on: March 06, 2018, 05:08:59 pm »
Could you please share a jsfiddle so that I can check.