Author Topic: Reload Refresh grid with new data  (Read 3390 times)

adham80

  • Newbie
  • *
  • Posts: 11
    • View Profile
Reload Refresh grid with new data
« on: December 24, 2018, 04:10:49 pm »
hi

im not able to reload the grid with new data [new number columns, new rows ]. or reset to default data
im trying to do this :

 let pqGrid = $(this.getContentElement()).pqGrid( 'instance');
          if (pqGrid){
                pqGrid.option("dataModel.data", this._pqGridData);
}

but getting the below error :
Uncaught TypeError: Cannot read property 'widget' of undefined
    at t.(anonymous function).(anonymous function).o._setOption (http://192.168.10.178/js/lib/pqgrid/pqgrid.min.js:10:2090)
    at t.(anonymous function).(anonymous function)._setOption (http://192.168.10.178/js/lib/jquery/jquery-ui-1.12.1.min.js:6:4499)
    at t.(anonymous function).(anonymous function)._setOptions (http://192.168.10.178/js/lib/jquery/jquery-ui-1.12.1.min.js:6:7740)
    at t.(anonymous function).(anonymous function).option (http://192.168.10.178/js/lib/jquery/jquery-ui-1.12.1.min.js:6:7673)
    at HTMLDivElement.<anonymous> (jquery-ui-1.12.1.min.js:6)
    at Function.each (jquery-3.3.1.js:354)
    at jQuery.fn.init.each (jquery-3.3.1.js:189)
    at jQuery.fn.init.t.fn.(anonymous function) [as pqGrid] (http://192.168.10.178/js/lib/jquery/jquery-ui-1.12.1.min.js:6:5787)
    at Grid.drawContent (Grid.js:16)
    at Grid.draw (BaseVxComponent.js:122)

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Reload Refresh grid with new data
« Reply #1 on: December 27, 2018, 06:59:55 pm »
your code apparently looks fine.

Could you share a jsfiddle to help locate the cause of error.