面对$ scope未定义的问题,任何帮助
this.gridOptions3 = {
data: this.pnasgn,
// enableCellEditOnFocus: false,
// enableRowSelection: false,
enableColumnResizing: true,
enableFiltering: false,
enableGridMenu: false,
showGridFooter: true,
showColumnFooter: true,
fastWatch: true,
enableHorizontalScrollbar: 2,
// rowIdentity: getRowId,
// getRowIdentity: getRowId,
importerDataAddCallback: (grid, newObjects)=> {
this.pnasgn = this.pnasgn.concat(newObjects);
},
columnDefs: [
{
field: 'PNASGN',
displayName: 'Part Number Assigned',
},
{
field: 'QITNUM',
displayName: 'QIT Number',
}
],
onRegisterApi: function(gridApi){$scope.gridApi3 = gridApi}
};
第一次使用ui-grid的用户,在gridOptions.data发生更改时尝试刷新html ui-grid