angular2 ag-grid过滤器,排序和分页

时间:2016-09-28 09:50:12

标签: angular filter paging ag-grid

我实现了ag-grid分页,排序和过滤。分页工作正常,但过滤广告排序仅适用于同一页面。过滤器和排序如何在整个页面上工作?

  <ag-grid-ng2 #agGrid style="width: 100%; height=450px" class="ag-common" #list 
    [gridOptions]="gridOptions"
    [columnDefs]="columns"
            [enableColResize]="true"
            [enableSorting]="true"
            [enableFilter]="true"
            [groupHeaders]="true"
            [suppressRowClickSelection]="true"
            [showToolPanel]="showToolPanel"
            [datasource]="dataSource"
             rowModelType = "pagination"
             rowHeight="26"
             colWidth="100"
             rowSelection="multiple"
             (gridReady)="gridReady"
             (rowClicked)="onRowClicked($event)">
  </ag-grid-ng2> 



in a TS file
this.gridOptions = <GridOptions> {
  onGridSizeChanged: () => {
    this.gridOptions.api.sizeColumnsToFit();
  }
};

0 个答案:

没有答案