Angular Tree Grid のリモートデータ操作
Ignite UI for Angular Tree Grid は、リモート仮想化、リモート ソート、リモート フィルタリングなどのリモート データ操作をサポートします。これにより、開発者はこれらのタスクをサーバー上で実行し、生成されたデータを取得して Tree Grid に表示できます。
Angular Tree Grid リモート データ操作の例
import { NgModule } from "@angular/core";
import { FormsModule } from "@angular/forms";
import { BrowserModule } from "@angular/platform-browser";
import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
import { AppComponent } from "./app.component";
import { IgxPreventDocumentScrollModule } from "./directives/prevent-scroll.directive";
import {
IgxTreeGridModule,
IgxIconModule,
IgxToastModule
} from "igniteui-angular";
import { TreeGridRemoteFilteringSampleComponent } from "./tree-grid-remote-filtering-sample/tree-grid-remote-filtering-sample.component";
@NgModule({
bootstrap: [AppComponent],
declarations: [
AppComponent,
TreeGridRemoteFilteringSampleComponent
],
imports: [
BrowserModule,
BrowserAnimationsModule,
FormsModule,
IgxPreventDocumentScrollModule,
IgxTreeGridModule,
IgxIconModule,
IgxToastModule
],
providers: [],
entryComponents: [],
schemas: []
})
export class AppModule {}
ts
import { AfterViewInit, ChangeDetectorRef, Component, OnDestroy, OnInit, ViewChild } from '@angular/core';
import { IgxTreeGridComponent, NoopFilteringStrategy } from 'igniteui-angular';
import { Observable, Subject } from 'rxjs';
import { debounceTime, takeUntil } from 'rxjs/operators';
import { RemoteFilteringService } from '../services/remoteFilteringService';
const DEBOUNCE_TIME = 300;
@Component({
providers: [RemoteFilteringService],
selector: 'app-tree-grid-remote-filtering-sample',
styleUrls: ['./tree-grid-remote-filtering-sample.component.scss'],
templateUrl: './tree-grid-remote-filtering-sample.component.html'
})
export class TreeGridRemoteFilteringSampleComponent implements OnInit, AfterViewInit, OnDestroy {
@ViewChild('treeGrid', { static: true }) public treeGrid: IgxTreeGridComponent;
public remoteData: Observable<any[]>;
public noopFilterStrategy = NoopFilteringStrategy.instance();
private destroy$ = new Subject<boolean>();
constructor(private _remoteService: RemoteFilteringService, private _cdr: ChangeDetectorRef) {
}
public ngOnInit() {
this.remoteData = this._remoteService.remoteData;
}
public ngAfterViewInit() {
this.processData();
this._cdr.detectChanges();
this.treeGrid.filteringExpressionsTreeChange.pipe(
debounceTime(DEBOUNCE_TIME),
takeUntil(this.destroy$)
).subscribe(() => {
this.processData();
});
}
public processData() {
this.treeGrid.isLoading = true;
const filteringExpr = this.treeGrid.filteringExpressionsTree;
this._remoteService.getData(filteringExpr, () => {
this.treeGrid.isLoading = false;
});
}
public ngOnDestroy() {
this.destroy$.next();
this.destroy$.complete();
}
}
ts
<div class="grid__wrapper">
<igx-tree-grid [igxPreventDocumentScroll]="true" #treeGrid [data]="remoteData | async" primaryKey="ID" foreignKey="ParentID" [autoGenerate]="false" width="100%" height="500px"
[filterStrategy]="noopFilterStrategy"
[allowFiltering]="true">
<igx-column [field]="'Name'" dataType="string"></igx-column>
<igx-column [field]="'Title'" dataType="string"></igx-column>
<igx-column [field]="'Age'" dataType="number"></igx-column>
<igx-column [field]="'HireDate'" dataType="date"></igx-column>
<igx-column [field]="'OnPTO'" dataType="boolean"width="130px">
<ng-template igxCell let-cell="cell" let-val>
<igx-icon [style.color]="cell.row.data.OnPTO? 'red': 'green'">account_circle</igx-icon>
</ng-template>
</igx-column>
</igx-tree-grid>
</div>
html
.grid__wrapper {
margin: 16px;
}
scss
このサンプルが気に入りましたか? 完全な Ignite UI for Angularツールキットにアクセスして、すばやく独自のアプリの作成を開始します。無料でダウンロードできます。
デフォルトで、Tree Grid は独自のロジックを使用してデータ操作を実行します。
これらのタスクをリモートで実行し、Tree Grid で公開される特定の入力とイベントを使用して Tree Grid に結果のデータを供給できます。
リモート フィルタリング
リモート フィルタリングを提供するには、受け取った引数に基づいて適切な要求を行うように filteringExpressionsTreeChange
出力にサブスクライブする必要があります。primaryKey
と foreignKey
を提供して、ツリー グリッドのデータ ソースとしてフラット コレクションを使用します。
また、rxjs debounceTime
関数を使用します。この関数は、特定の期間の経過後、別のソースが出力されない場合にのみ、Observable のソースから値を出力します。この方法では、ユーザーが中断することなく指定された時間が経過した場合にのみ、リモート操作がトリガーされます。
const DEBOUNCE_TIME = 300;
...
public ngAfterViewInit() {
...
this.treeGrid.filteringExpressionsTreeChange.pipe(
debounceTime(DEBOUNCE_TIME),
takeUntil(this.destroy$)
).subscribe(() => {
this.processData();
});
}
typescript
リモート フィルタリングが提供される場合、ツリー グリッドの組み込みのフィルタリングは必要ありません。ツリー グリッドの filterStrategy
入力を NoopFilteringStrategy
インスタンスに設定して、無効にできます。
<igx-tree-grid #treeGrid [data]="remoteData | async" primaryKey="ID" foreignKey="ParentID"
[autoGenerate]="false"
[filterStrategy]="noopFilterStrategy"
[allowFiltering]="true">
<igx-column [field]="'Name'" dataType="string"></igx-column>
<igx-column [field]="'Title'" dataType="string"></igx-column>
<igx-column [field]="'Age'" dataType="number"></igx-column>
</igx-tree-grid>
html
public noopFilterStrategy = NoopFilteringStrategy.instance();
public processData() {
this.treeGrid.isLoading = true;
const filteringExpr = this.treeGrid.filteringExpressionsTree;
this._remoteService.getData(filteringExpr, () => {
this.treeGrid.isLoading = false;
});
}
typescript
リモート フィルタリングは、フラット コレクションで直接実行する必要があります。また、親がフィルターに一致するかどうかにかかわらず、フィルター条件に一致するすべてのレコードにすべての親を含める必要があります (階層をそのままにするためにこれを行います)。結果は以下で確認できます。
リモー トデータが要求された場合、フィルタリング操作が大文字と小文字を区別します。
リモート フィルタリングのデモ
このトピックのはじめにあるコードの結果は、デモで確認できます。
一意の列値ストラテジ
Excel スタイル フィルタリング ダイアログ内のリスト項目は、それぞれの列の一意の値を表します。Tree Grid は、デフォルトでデータソースに基づいてこれらの値を生成します。リモート フィルタリングの場合、グリッドのデータにはサーバーからのすべてのデータが含まれていません。これらの一意の値を手動で提供し、オンデマンドで読み込むために、Tree Grid の uniqueColumnValuesStrategy
入力を利用できます。この入力は、実際には 3 つの引数を提供するメソッドです。
- column - フィルタリング式ツリー。各列に基づいて削減されます。
- filteringExpressionsTree - フィルタリング式ツリー。各列に基づいて削減されます。
- done - サーバーから取得されたときに、新しく生成された列値で呼び出されるコールバック。
開発者は、列と filteringExpressionsTree 引数によって提供される情報に基づいて、必要な一意の列値を手動で生成し、done コールバックを呼び出すことができます。
<igx-tree-grid #treeGrid [data]="data" [filterMode]="'excelStyleFilter'" [uniqueColumnValuesStrategy]="columnValuesStrategy">
...
</igx-tree-grid>
html
public columnValuesStrategy = (column: ColumnType,
columnExprTree: IFilteringExpressionsTree,
done: (uniqueValues: any[]) => void) => {
this.remoteValuesService.getColumnData(column, columnExprTree, uniqueValues => done(uniqueValues));
}
typescript
一意の列値ストラテジのデモ
import { NgModule } from "@angular/core";
import { FormsModule } from "@angular/forms";
import { BrowserModule } from "@angular/platform-browser";
import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
import { AppComponent } from "./app.component";
import { IgxPreventDocumentScrollModule } from "./directives/prevent-scroll.directive";
import {
IgxTreeGridModule,
IgxIconModule
} from "igniteui-angular";
import { TreeGridExcelStyleFilteringLoadOnDemandComponent } from "./tree-grid/tree-grid-excel-style-filtering-load-on-demand/tree-grid-excel-style-filtering-load-on-demand.component";
import { RemoteValuesService } from "./tree-grid/tree-grid-excel-style-filtering-load-on-demand/remoteValues.service";
@NgModule({
bootstrap: [AppComponent],
declarations: [
AppComponent,
TreeGridExcelStyleFilteringLoadOnDemandComponent
],
imports: [
BrowserModule,
BrowserAnimationsModule,
FormsModule,
IgxPreventDocumentScrollModule,
IgxTreeGridModule,
IgxIconModule
],
providers: [RemoteValuesService],
entryComponents: [],
schemas: []
})
export class AppModule {}
ts
import { Component, OnInit } from '@angular/core';
import { IFilteringExpressionsTree, IgxColumnComponent } from 'igniteui-angular';
import { RemoteValuesService } from './remoteValues.service';
@Component({
selector: 'app-tree-grid-excel-style-filtering-load-on-demand',
styleUrls: ['./tree-grid-excel-style-filtering-load-on-demand.component.scss'],
templateUrl: './tree-grid-excel-style-filtering-load-on-demand.component.html',
providers: [RemoteValuesService]
})
export class TreeGridExcelStyleFilteringLoadOnDemandComponent implements OnInit {
public data: any[];
constructor(private remoteValuesService: RemoteValuesService) { }
public ngOnInit() {
this.data = this.remoteValuesService.getRecordsData();
}
public columnValuesStrategy = (column: IgxColumnComponent,
columnExprTree: IFilteringExpressionsTree,
done: (uniqueValues: any[]) => void) => {
this.remoteValuesService.getColumnData(column, columnExprTree, uniqueValues => done(uniqueValues));
};
}
ts
<div class="grid__wrapper">
<igx-tree-grid [igxPreventDocumentScroll]="true" #treegrid1 [data]="data" height="750px" primaryKey="ID" foreignKey="ParentID" [displayDensity]="'cosy'" [autoGenerate]="false"
[allowFiltering]="true" [filterMode]="'excelStyleFilter'"
[uniqueColumnValuesStrategy]="columnValuesStrategy" [moving]="true">
<igx-grid-toolbar>
<igx-grid-toolbar-actions>
<igx-grid-toolbar-hiding></igx-grid-toolbar-hiding>
<igx-grid-toolbar-pinning></igx-grid-toolbar-pinning>
</igx-grid-toolbar-actions>
</igx-grid-toolbar>
<igx-column [field]="'Name'" dataType="string"></igx-column>
<igx-column [field]="'Title'" dataType="string"></igx-column>
<igx-column [field]="'Age'" dataType="number"></igx-column>
<igx-column [field]="'HireDate'" dataType="date"></igx-column>
<igx-column [field]="'OnPTO'" dataType="boolean" width="130px">
<ng-template igxCell let-cell="cell" let-val>
<igx-icon [style.color]="cell.row.data.OnPTO? 'red': 'green'">account_circle</igx-icon>
</ng-template>
</igx-column>
</igx-tree-grid>
</div>
html
.grid__wrapper {
margin: 16px;
}
scss
Excel スタイル フィルタリングのカスタム ロード テンプレートを提供するには、igxExcelStyleLoading
ディレクティブを使用できます。
<igx-tree-grid [data]="data" [filterMode]="'excelStyleFilter'" [uniqueColumnValuesStrategy]="columnValuesStrategy">
...
<ng-template igxExcelStyleLoading>
Loading ...
</ng-template>
</igx-tree-grid>
html
リモート ページング
このサンプルでは、子レコードがいくつあっても、ページごとに一定数のルート レコードを表示する方法を示します。レベル (root または child) に関係なく一定数のレコードを表示するビルトインの Tree Grid ページング アルゴリズムをキャンセルするには、perPage
プロパティを Number.MAX_SAFE_INTEGER
に設定してください。
<igx-tree-grid #treeGrid ...>
<igx-paginator [perPage]="maxPerPage">
</igx-paginator>
...
html
public maxPerPage = Number.MAX_SAFE_INTEGER;
typescript
これで、独自のカスタム ページング テンプレートを設定するか、igx-paginator
が提供するデフォルトのテンプレートを使用するかを選択できます。まず、デフォルトのページング テンプレートを使用してリモート ページングを設定するために必要なものを見てみましょう。
デフォルト テンプレートのリモート ページング
デフォルトのページング テンプレートを使用する場合、totalRecords
プロパティを設定する必要があります。それにより、グリッドはリモートの合計レコード数に基づいて合計ページ番号を計算できます。リモート ページネーションを実行する場合、グリッドに現在のページのデータのみを渡すため、グリッドは提供されたデータソースのページネーションを試行しません。そのため、pagingMode
プロパティを GridPagingMode.remote に設定する必要があります。リモート サービスからデータをフェッチするために pagingDone
または perPageChange
イベントにサブスクライブする必要があります。イベントが使用されるユース ケースによって異なります。
<igx-tree-grid #treeGrid [data]="data | async" childDataKey="Content" [pagingMode]="mode">
<igx-column field="Name"></igx-column>
...
<igx-paginator [(page)]="page" [(perPage)]="perPage" [totalRecords]="totalCount"
(pagingDone)="paginate($event.current)">
</igx-paginator>
</igx-tree-grid>
html
public totalCount = 0;
public data: Observable<any[]>;
public mode = GridPagingMode.remote;
public isLoading = true;
@ViewChild('grid1', { static: true }) public grid1: IgxGridComponent;
private _dataLengthSubscriber;
public set perPage(val: number) {
this._perPage = val;
this.paginate(0);
}
public ngOnInit() {
this.data = this.remoteService.remoteData.asObservable();
this._dataLengthSubscriber = this.remoteService.getDataLength().subscribe((data: any) => {
this.totalCount = data;
this.grid1.isLoading = false;
});
}
public ngAfterViewInit() {
const skip = this.page * this.perPage;
this.remoteService.getData(skip, this.perPage);
}
public paginate(page: number) {
this.page = page;
const skip = this.page * this.perPage;
const top = this.perPage;
this.remoteService.getData(skip, top);
}
typescript
import { NgModule } from "@angular/core";
import { FormsModule } from "@angular/forms";
import { BrowserModule } from "@angular/platform-browser";
import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
import { AppComponent } from "./app.component";
import { IgxPreventDocumentScrollModule } from "./directives/prevent-scroll.directive";
import { IgxTreeGridModule } from "igniteui-angular";
import { TreeGridRemotePagingDefaultTemplateComponent } from "./tree-grid-remote-paging-default-template/tree-grid-remote-paging-default-template.component";
@NgModule({
bootstrap: [AppComponent],
declarations: [
AppComponent,
TreeGridRemotePagingDefaultTemplateComponent
],
imports: [
BrowserModule,
BrowserAnimationsModule,
FormsModule,
IgxPreventDocumentScrollModule,
IgxTreeGridModule
],
providers: [],
entryComponents: [],
schemas: []
})
export class AppModule {}
ts
import { formatNumber } from '@angular/common';
import { AfterViewInit, ChangeDetectorRef, Component, OnDestroy, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';
import { GridPagingMode, IgxTreeGridComponent } from 'igniteui-angular';
import { Observable } from 'rxjs';
import { RemotePagingService } from './remotePagingService';
@Component({
encapsulation: ViewEncapsulation.None,
providers: [RemotePagingService],
selector: 'app-tree-grid-remote-paging-default-template',
styleUrls: ['./tree-grid-remote-paging-default-template.component.scss'],
templateUrl: './tree-grid-remote-paging-default-template.component.html'
})
export class TreeGridRemotePagingDefaultTemplateComponent implements OnInit, AfterViewInit, OnDestroy {
@ViewChild('treeGrid', { static: true }) public treeGrid: IgxTreeGridComponent;
public totalCount = 0;
public page = 0;
public data: Observable<any[]>;
public mode = GridPagingMode.Remote;
public isLoading = true;
private _dataLengthSubscriber;
private _perPage = 10;
public get perPage(): number {
return this._perPage;
}
public set perPage(val: number) {
this._perPage = val;
this.paginate(0);
}
constructor(
private remoteService: RemotePagingService, private cd: ChangeDetectorRef) {
}
public ngOnInit() {
this.data = this.remoteService.remoteData.asObservable();
this.data.subscribe(() => {
this.isLoading = false;
this.cd.detectChanges();
});
this._dataLengthSubscriber = this.remoteService.dataLength.subscribe((data) => {
this.totalCount = data;
});
}
public ngOnDestroy() {
if (this._dataLengthSubscriber) {
this._dataLengthSubscriber.unsubscribe();
}
}
public ngAfterViewInit() {
this.remoteService.getData(0, this.treeGrid.perPage);
this.remoteService.getDataLength();
}
public paginate(page) {
this.isLoading = true;
const skip = page * this.treeGrid.perPage;
this.remoteService.getData(skip, this.treeGrid.perPage);
}
public formatSize(value: number) {
return formatNumber(value, 'en') + ' KB';
}
}
ts
<div class="grid__wrapper">
<igx-tree-grid [igxPreventDocumentScroll]="true" #treeGrid [data]="data | async" childDataKey="Content" [expansionDepth]="0" width="100%"
height="540px" [isLoading]="isLoading" [pagingMode]="mode">
<igx-paginator
[totalRecords]="totalCount"
(pagingDone)="paginate($event.current)"
[(page)]="page"
[(perPage)]="perPage">
</igx-paginator>
<igx-column field="Name">
<ng-template igxCell let-cell="cell" let-val>
<igx-icon *ngIf="cell.row.data.Type === 'File folder'" family="material" class="typeIcon">folder
</igx-icon>
<igx-icon *ngIf="cell.row.data.Type === 'JPG File'" family="material" class="typeIcon">photo</igx-icon>
{{val}}
</ng-template>
</igx-column>
<igx-column field="Type"></igx-column>
<igx-column field="Size" dataType="number" [formatter]="formatSize"></igx-column>
</igx-tree-grid>
</div>
html
.grid__wrapper {
margin: 0 16px;
padding-top: 10px;
}
.typeIcon {
margin-right: 0.5rem;
}
scss
カスタム igx-paginator-content のリモート ページング
カスタム ページネーター コンテンツを定義するときは、要求されたページのデータのみを取得するようにコンテンツを定義し、選択したページと perPage
項目に応じて正しい skip および top パラメーターをリモート サービスに渡す必要があります。導入された IgxPageSizeSelectorComponent
と IgxPageNavigationComponent
とともに、設定例を簡単にするために <igx-paginator>
を使用します。igx-page-size
はページごとのドロップダウンとラベルを追加し、igx-page-nav
はナビゲーション アクション ボタンとラベルを追加します。
<igx-paginator #paginator
[totalRecords]="totalCount"
[(perPage)]="perPage"
[selectOptions]="selectOptions"
(pageChange)="paginate($event)">
<igx-paginator-content>
<igx-page-size></igx-page-size>
[This is my custom content]
<igx-page-nav></igx-page-nav>
</igx-paginator-content>
</igx-paginator>
html
public paginate(page: number) {
this.page = page;
const skip = this.page * this.perPage;
const top = this.perPage;
this.remoteService.getData(skip, top);
}
typescript
リモート ページングを適切に構成するには、GridPagingMode.Remote
を設定する必要があります。
<igx-tree-grid #treeGrid [data]="data | async" childDataKey="Content"
expansionDepth="0" width="100%" height="540px" [pagingMode]="mode"></igx-tree-grid>
...
public mode = GridPagingMode.Remote;
html
最後の手順は、要件に基づいてページネーターのコンテンツを宣言することです。
<igx-paginator-content>
<igx-page-size></igx-page-size>
[This is my custom content]
<igx-page-nav></igx-page-nav>
</igx-paginator-content>
html
上記すべての設定を完了すると以下のような結果になります。
import { NgModule } from "@angular/core";
import { FormsModule } from "@angular/forms";
import { BrowserModule } from "@angular/platform-browser";
import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
import { AppComponent } from "./app.component";
import { IgxPreventDocumentScrollModule } from "./directives/prevent-scroll.directive";
import {
IgxTreeGridModule,
IgxSelectModule
} from "igniteui-angular";
import { TreeGridRemotePagingSampleComponent } from "./tree-grid-remote-paging-sample/tree-grid-remote-paging-sample.component";
@NgModule({
bootstrap: [AppComponent],
declarations: [
AppComponent,
TreeGridRemotePagingSampleComponent
],
imports: [
BrowserModule,
BrowserAnimationsModule,
FormsModule,
IgxPreventDocumentScrollModule,
IgxTreeGridModule,
IgxSelectModule
],
providers: [],
entryComponents: [],
schemas: []
})
export class AppModule {}
ts
import { formatNumber } from '@angular/common';
import { AfterViewInit, Component, OnDestroy, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';
import { GridPagingMode, IgxTreeGridComponent } from 'igniteui-angular';
import { Observable } from 'rxjs';
import { RemotePagingService } from './remotePagingService';
@Component({
encapsulation: ViewEncapsulation.None,
providers: [RemotePagingService],
selector: 'app-tree-grid-remote-paging-grid-sample',
styleUrls: ['./tree-grid-remote-paging-sample.component.scss'],
templateUrl: './tree-grid-remote-paging-sample.component.html'
})
export class TreeGridRemotePagingSampleComponent implements OnInit, AfterViewInit, OnDestroy {
@ViewChild('treeGrid', { static: true }) public treeGrid: IgxTreeGridComponent;
public page = 0;
public lastPage = false;
public firstPage = true;
public totalPages = 1;
public totalCount = 0;
public data: Observable<any[]>;
public selectOptions = [5, 10, 25, 50];
public mode = GridPagingMode.Remote;
private _perPage = 10;
private _dataLengthSubscriber;
constructor(
private remoteService: RemotePagingService) {
}
public get perPage(): number {
return this._perPage;
}
public set perPage(val: number) {
this._perPage = val;
this.paginate(0);
}
public ngOnInit() {
this.data = this.remoteService.remoteData.asObservable();
this._dataLengthSubscriber = this.remoteService.dataLength.subscribe((data) => {
this.totalCount = data;
this.totalPages = Math.ceil(data / this.perPage);
this.treeGrid.isLoading = false;
});
}
public ngOnDestroy() {
if (this._dataLengthSubscriber) {
this._dataLengthSubscriber.unsubscribe();
}
}
public ngAfterViewInit() {
this.treeGrid.isLoading = true;
this.remoteService.getData(0, this.perPage);
this.remoteService.getDataLength();
}
public paginate(page: number) {
this.page = page;
const skip = this.page * this.perPage;
const top = this.perPage;
this.remoteService.getData(skip, top);
}
public formatSize(value: number) {
return formatNumber(value, 'en') + ' KB';
}
}
ts
<div class="grid__wrapper">
<igx-tree-grid [igxPreventDocumentScroll]="true" #treeGrid [data]="data | async" childDataKey="Content"
[expansionDepth]="0" width="100%" height="540px" [pagingMode]="mode">
<igx-column field="Name">
<ng-template igxCell let-cell="cell" let-val>
<igx-icon *ngIf="cell.row.data.Type === 'File folder'" family="material" class="typeIcon">folder
</igx-icon>
<igx-icon *ngIf="cell.row.data.Type === 'JPG File'" family="material" class="typeIcon">photo</igx-icon>
{{val}}
</ng-template>
</igx-column>
<igx-column field="Type"></igx-column>
<igx-column field="Size" dataType="number" [formatter]="formatSize"></igx-column>
<igx-paginator #paginator
[totalRecords]="totalCount"
[(perPage)]="perPage"
[selectOptions]="selectOptions"
[displayDensity]="treeGrid.displayDensity"
(pageChange)="paginate($event)">
<igx-paginator-content>
<igx-page-size></igx-page-size>
[This is my custom content]
<igx-page-nav></igx-page-nav>
</igx-paginator-content>
</igx-paginator>
</igx-tree-grid>
</div>
html
.grid__wrapper {
margin: 0 16px;
padding-top: 10px;
}
.typeIcon {
margin-right: 0.5rem;
}
scss
既知の問題と制限
- グリッドに
primaryKey
が設定されておらず、リモート データ シナリオが有効になっている場合 (ページング、ソート、フィルタリング、スクロール時に、グリッドに表示されるデータを取得するためのリモート サーバーへのリクエストがトリガーされる場合)、データ要求が完了すると、行は次の状態を失います:
- リモート データ シナリオでは、グリッドに
primaryKey
が設定されている場合、rowSelectionChanging.oldSelection
イベント引数には、現在データ ビューに含まれていない行の完全な行データ オブジェクトが含まれません。この場合、rowSelectionChanging.oldSelection
オブジェクトには、primaryKey
フィールドである 1 つのプロパティのみが含まれます。現在データ ビューにある残りの行については、rowSelectionChanging.oldSelection
に行データ全体が含まれます。
API リファレンス
その他のリソース
コミュニティに参加して新しいアイデアをご提案ください。