Angular Ag网格标头复选框选择

Angular Ag网格标头复选框选择,angular,ag-grid-angular,Angular,Ag Grid Angular,我正在使用带有服务器端数据的Ag网格 html代码是: *ngIf="isShowProceedButton" #agGrid style="width: 100%; height: 70vh; float: left;" class="ag-theme-balham template-grid" [enableSorting]="true" [enableFilter]="t

我正在使用带有服务器端数据的Ag网格

html代码是:

          *ngIf="isShowProceedButton"
          #agGrid
          style="width: 100%; height: 70vh; float: left;"
          class="ag-theme-balham template-grid"
          [enableSorting]="true"
          [enableFilter]="true"
          [gridOptions]="gridOptions"
          (gridReady)="onGridReady($event)"
          rowSelection="multiple"
        >
        </ag-grid-angular>
ts file code:
       this.columnDefs.push({
              // headerName: keyValues[j], field: this.headers[i],
              headerName: keyValues[j],
              field: this.headers[i],
              'isMapped': 0,
              'skipRow': this.rowHeader[i].skipRow,
              headerComponentFramework: AgGridCheckboxComponent,
              'isShowCheckBox': this.isShowProceedButton
            }) 
*ngIf=“isShowProceedButton”
#怨恨
style=“宽度:100%;高度:70vh;浮动:左侧;”
class=“ag主题balham模板网格”
[启用排序]=“真”
[enableFilter]=“真”
[gridOptions]=“gridOptions”
(gridReady)=“onGridReady($event)”
rowSelection=“多个”
>
ts文件代码:
这是推({
//headerName:keyValues[j],字段:this.headers[i],
headerName:keyValues[j],
字段:this.headers[i],
“isMapped”:0,
“skipRow”:this.rowHeader[i].skipRow,
HeaderComponent框架:AgGridCheckboxComponent,
“isShowCheckBox”:this.isShowProceedButton
}) 
它将显示带有复选框的网格

但当我取消选中复选框时,例如取消选中FY2014E并水平滚动,然后再次显示选中的复选框。 请帮我找出解决办法。
感谢您的帮助。

您好,您必须在gridOptions中设置SuppressColumnVirtualization属性,如下所示:

this.gridOptions.suppressColumnVirtualisation = true;