jQuery UI Widgets › Forums › General Discussions › Plugins › AngularJS › Refresh Grid › Reply To: Refresh Grid
Hi Peter,
I’m experiencing an issue only trying to rebind an updated data source to the treegrid. In other words, the initial rendering if fine; however, after making a round trip to the server for new data, I would like to re-render the treegrid with the updated data. Can you provide specific advice ?
further details:
If I set a breakpoint in the front end, I can view the “source” object which contains the dataAdapter :
widget.dataModel.widgetScope.treeGridOptions.source
i.jqx.dataAdapter {_source: Object, _options: Object, records: Array[0], _downloadComplete: Array[0], _bindingUpdate: Array[0]…}_
So I was looking for a way to “rebind” the data to the treegrid, and I do in fact see a “databind” object. However, it does nothing.
Your own documentation says that the settings object is extended with refresh
and apply
methods (see http://www.jqwidgets.com/jquery-widgets-documentation/documentation/angularjs/angularjs.htm); however I now see that it does need specific parameters.
So on my treegrid I have:
<div id=”treeGrid” jqx-tree-grid jqx-instance=”treegrid” jqx-settings=”treeGridOptions”></div>
then in my controller I assign the dataAdapter and the column definitions like this :
$scope.result.dataModel.treeGridOptions.source = dataAdapter;
$scope.result.dataModel.treeGridOptions.columns = colDefs;
so I was expecting to have access to the refresh method (i.e. `$scope.result.dataModel.treeGridOptions.refresh([‘width’, ‘height’])’ )
Am I using in the wrong way?
I was following your jqx-combo-box example at the link I posted :
$scope.comboBoxSettings.refresh([‘width’, ‘height’]);