0

I would like to load data on demand but I don't really see the posibilty to catch on scroll on any kind of these events. How to implement custom loading of data depended on scrolling?

<dx-data-grid id="gridContainer"
              [remoteOperations]="true"
              [allowColumnResizing]="true"
              [columnAutoWidth]="true"
              [columnMinWidth]="75"
              [dataSource]="dataSource | async"
              (onContentReady)="onContentReady($event)">
  <dxo-scrolling mode="virtual" rowRenderingMode="virtual"></dxo-scrolling>
  <dxo-load-panel [enabled]="true"></dxo-load-panel>
  <dxo-paging [pageSize]="100"></dxo-paging>

  <div *ngFor="let col of columns;">
    <dxi-column dataField="{{col.dataField}}"
                caption="{{col.caption | translate }}"
                cellTemplate="dateTimeCellTemplate"
                [alignment]="'left'"
                [allowFiltering]="true"
                *ngIf="col.dataField == 'eventAt'; else elseBlock"
                (sortOrderChange)="customSortingFunction($event)"
                [sortOrder]="'desc'">
    </dxi-column>
    <div *dxTemplate="let cellData of 'dateTimeCellTemplate'">
      {{cellData.text | dateFormat: 'MM/DD/YYYY HH:MM:SS'}}
    </div>

    <ng-template #elseBlock>
      <dxi-column dataField="{{col.dataField}}"
                  caption="{{col.caption | translate}}"
                  [alignment]="'left'"
                  [allowSorting]="false"
                  [allowSearch]="true">
      </dxi-column>
    </ng-template>
  </div>
</dx-data-grid>
hackp0int
  • 4,052
  • 8
  • 59
  • 95

0 Answers0