クラス IgxPivotGridComponent

Pivot Grid は、ピボット テーブル ビューでデータを表示および操作する方法を提供します。

Igx Module

IgxPivotGridModule

Igx Group

グリッド & リスト

Igx Keywords

pivot, grid, table

Igx Theme

igx-grid-theme

Remarks

Ignite UI Pivot Grid は、シンプルなフラット データをグループ化してピボット テーブルに集計するために使用されます。 データがバインドされ、ディメンションと値が構成されると、ソートとフィルタリングによって操作できます。

Example

<igx-pivot-grid [data]="data" [pivotConfiguration]="configuration">
</igx-pivot-grid>

階層

Hierarchy

  • IgxGridBaseDirective
    • IgxPivotGridComponent

実装

  • OnInit
  • AfterContentInit
  • GridType
  • AfterViewInit

コンストラクタ

プロパティ

アクセサー

メソッド

コンストラクタ

  • パラメーター

    • validationService: IgxGridValidationService
    • selectionService: IgxGridSelectionService
    • colResizingService: IgxPivotColumnResizingService
    • gridAPI: GridBaseAPIService<IgxGridBaseDirective & GridType>
    • transactionFactory: IgxFlatTransactionFactory
    • elementRef: ElementRef<HTMLElement>
    • zone: NgZone
    • document: any
    • cdr: ChangeDetectorRef
    • differs: IterableDiffers
    • viewRef: ViewContainerRef
    • appRef: ApplicationRef
    • injector: Injector
    • envInjector: EnvironmentInjector
    • navigation: IgxPivotGridNavigationService
    • filteringService: IgxFilteringService
    • overlayService: IgxOverlayService
    • summaryService: IgxGridSummaryService
    • _displayDensityOptions: IDisplayDensityOptions
    • localeId: string
    • platform: PlatformUtil
    • オプション _diTransactions: TransactionService<Transaction, State>

    返却 IgxPivotGridComponent

プロパティ

activeNodeChange: EventEmitter<IActiveNodeChangeEventArgs> = ...

アクティブなノードが変更されたときに発生します。

Example

<igx-grid [data]="data" [autoGenerate]="true" (activeNodeChange)="activeNodeChange($event)"></igx-grid>
advancedFilteringExpressionsTreeChange: EventEmitter<IFilteringExpressionsTree> = ...

高度フィルタリングが実行された後に発生されます。

Remarks

高度フィルタリング式ツリーを返します。

Example

<igx-grid #grid [data]="localData" [height]="'305px'" [autoGenerate]="true"
(advancedFilteringExpressionsTreeChange)="advancedFilteringExprTreeChange($event)"></igx-grid>
cdr: ChangeDetectorRef
cellClick: EventEmitter<IGridCellEventArgs> = ...

セルがクリックされたときに発生します。

Remarks

IgxGridCell を返します。

Example

<igx-grid #grid (cellClick)="cellClick($event)" [data]="localData" [height]="'305px'" [autoGenerate]="true"></igx-grid>
clipboardOptions: {
    copyFormatters: boolean;
    copyHeaders: boolean;
    enabled: boolean;
    separator: string;
} = ...

グリッドのコピー動作を制御します。

Type declaration

  • copyFormatters: boolean

    Apply the columns formatters (if any) on the data in the clipboard output.

  • copyHeaders: boolean

    Include the columns headers in the clipboard output.

  • enabled: boolean

    Enables/disables the copy behavior

  • separator: string

    The separator used for formatting the copy output. Defaults to \t.

columnInit: EventEmitter<IgxColumnComponent> = ...

列が初期化されるときに発生します。

Remarks

列オブジェクトを返します。

Example

<igx-grid #grid [data]="localData" (columnInit)="initColumns($event)" [autoGenerate]="true"></igx-grid>
columnResized: EventEmitter<IColumnResizeEventArgs> = ...

列がサイズ変更されたときに発生されます。

Remarks

IgxColumnComponent オブジェクトの古い幅および新しい幅を返します。

Example

<igx-grid #grid [data]="localData" (columnResized)="resizing($event)" [autoGenerate]="true"></igx-grid>
columnSelectionChanging: EventEmitter<IColumnSelectionEventArgs> = ...

IgxColumnComponent が選択されたときに発生します。

Example

<igx-grid #grid (columnSelectionChanging)="columnSelectionChanging($event)" [data]="localData" [autoGenerate]="true"></igx-grid>
columnVisibilityChanged: EventEmitter<IColumnVisibilityChangedEventArgs> = ...

列の表示状態を変更するときに発生されます。

Remarks

引数: { column: IgxColumnComponent, newValue: boolean }

Example

<igx-grid (columnVisibilityChanged)="visibilityChanged($event)"></igx-grid>
columnVisibilityChanging: EventEmitter<IColumnVisibilityChangingEventArgs> = ...

列の表示状態を変更する前に発生されます。

Remarks

引数: { column: any, newValue: boolean }

Example

<igx-grid (columnVisibilityChanging)="visibilityChanging($event)"></igx-grid>
contextMenu: EventEmitter<IGridCellEventArgs> = ...

セルが右クリックされたときに発生されます。

Remarks

IgxGridCell オブジェクトを返します。

<igx-grid #grid [data]="localData" (contextMenu)="contextMenu($event)" [autoGenerate]="true"></igx-grid>
dataChanged: EventEmitter<any> = ...

データ操作や再バインドなどにより、グリッドのデータ ビューが変更される後に発生されます。

Example

 <igx-grid #grid [data]="localData" [autoGenerate]="true" (dataChanged)='handleDataChangedEvent()'></igx-grid>
dataChanging: EventEmitter<IForOfDataChangingEventArgs> = ...

データ操作や再バインドなどにより、グリッドのデータ ビューが変更される前に発生されます。

Example

 <igx-grid #grid [data]="localData" [autoGenerate]="true" (dataChanging)='handleDataChangingEvent()'></igx-grid>
densityChanged: EventEmitter<IDensityChangedEventArgs> = ...
dimensionInit: EventEmitter<IPivotDimension> = ...

ディメンションが初期化されるときに発生します。

Remarks

初期化されようとしているディメンションを発生します。

Example

<igx-pivot-grid #grid [data]="localData" [height]="'305px'"
(dimensionInit)="dimensionInit($event)"></igx-pivot-grid>
dimensionsChange: EventEmitter<IDimensionsChange> = ...

グリッド チップ領域によってディメンション コレクションが変更されたときに発生します。

Remarks

新しいディメンション コレクションとそのタイプを返します。

Example

<igx-pivot-grid #grid [data]="localData" [height]="'305px'"
(dimensionsChange)="dimensionsChange($event)"></igx-grid>
dimensionsSortingExpressionsChange: EventEmitter<ISortingExpression<any>[]> = ...

ディメンションがソートされたときに発生します。

Example

<igx-pivot-grid #grid [data]="localData" [height]="'305px'"
(dimensionsSortingExpressionsChange)="dimensionsSortingExpressionsChange($event)"></igx-pivot-grid>
doubleClick: EventEmitter<IGridCellEventArgs> = ...

セルがダブルクリックされたときに発生されます。

Remarks

IgxGridCell オブジェクトを返します。

Example

<igx-grid #grid [data]="localData" (doubleClick)="dblClick($event)" [autoGenerate]="true"></igx-grid>
emptyGridTemplate: TemplateRef<void>

空の場合のカスタム テンプレートを取得または設定します。

Example

<igx-grid [id]="'igx-grid-1'" [data]="Data" [emptyGridTemplate]="myTemplate" [autoGenerate]="true"></igx-grid>
emptyPivotGridTemplate: TemplateRef<void>

ピボット グリッドが空の場合にカスタム テンプレートを取得または設定します。

Example

<igx-pivot-grid [emptyPivotGridTemplate]="myTemplate"><igx-pivot-grid>
filtering: EventEmitter<IFilteringEventArgs> = ...

フィルタリング式が適用される前に発生されます。

Remarks

IFilteringEventArgs オブジェクトを返します。filteringExpressions キーは、列のフィルタリング式を保持します。

Example

<igx-grid #grid [data]="localData" [height]="'305px'" [autoGenerate]="true" (filtering)="filtering($event)"></igx-grid>
filteringDone: EventEmitter<IFilteringExpressionsTree> = ...

フィルタリングが UI で実行されたときに発生されます。

Remarks

フィルターされた列のフィルタリング式ツリーを返します。

Example

<igx-grid #grid [data]="localData" [height]="'305px'" [autoGenerate]="true" (filteringDone)="filteringDone($event)"></igx-grid>
filteringExpressionsTreeChange: EventEmitter<IFilteringExpressionsTree> = ...

フィルタリングが実行された後に発生されます。

Remarks

フィルターされた列のフィルタリング式ツリーを返します。

Example

<igx-grid #grid [data]="localData" [height]="'305px'" [autoGenerate]="true"
(filteringExpressionsTreeChange)="filteringExprTreeChange($event)"></igx-grid>
formGroupCreated: EventEmitter<IGridFormGroupCreatedEventArgs> = ...

行/セルの編集で formGroup が作成されたときに発生します。

Example

<igx-grid #grid (formGroupCreated)="formGroupCreated($event)" [data]="localData" [height]="'305px'" [autoGenerate]="true"></igx-grid>
gridCopy: EventEmitter<IGridClipboardEvent> = ...

コピー操作が実行されたときに発生します。

Remarks

[clipboardOptions]IgxGridBaseDirective#clipboardOptions でコピー動作が有効になっている場合にのみ発生します。

gridKeydown: EventEmitter<IGridKeydownEventArgs> = ...

グリッドの内の要素に対してキーダウンがトリガーされたときに発生します。

Remarks

このイベントは、グリッドでキーの組み合わせがサポートされている場合にのみ発生します。 ターゲット タイプ、ターゲット オブジェクト、および元のイベントを返します。このイベントはキャンセルできます。

Example

 <igx-grid (gridKeydown)="customKeydown($event)"></igx-grid>
gridScroll: EventEmitter<IGridScrollEventArgs> = ...

グリッドが水平/垂直にスクロールされるときに発生します。

Example

<igx-grid #grid [data]="localData" [height]="'305px'" [autoGenerate]="true"
(gridScroll)="onScroll($event)"></igx-grid>
loadingGridTemplate: TemplateRef<void>

読み込み時のカスタム テンプレートを取得または設定します。

Example

<igx-grid [id]="'igx-grid-1'" [data]="Data" [loadingGridTemplate]="myTemplate" [autoGenerate]="true"></igx-grid>
navigation: IgxGridNavigationService
pivotConfigurationChange: EventEmitter<IPivotConfigurationChangedEventArgs> = ...

pivotConfiguration プロパティのいずれかがグリッド チップ領域を介して変更されたときに発生します。

Example

<igx-pivot-grid #grid [data]="localData" [height]="'305px'"
(pivotConfigurationChanged)="configurationChanged($event)"></igx-grid>
primaryKey: any

プライマリ キーを取得または設定します。

Example

<igx-grid #grid [data]="localData" [primaryKey]="'ProductID'" [autoGenerate]="true"></igx-grid>
rangeSelected: EventEmitter<GridSelectionRange> = ...

範囲選択を行ったときに発生します。

Remarks

範囲選択がドラッグ選択またはキーボード選択による行います。

rendered: EventEmitter<boolean> = ...

ngAfterViewInit の後に発生します。この時点で、グリッドは DOM に存在します。

rowClasses: any

グリッドの行要素に条件付きクラス セレクターを設定します。 キーと値のペアを含むオブジェクト リテラルを受け取ります。 キーは CSS クラスの名前です。 値はブール値を返すコールバック関数またはブール値です。例:

callback = (row: RowType) => { return row.selected > 6; }
rowClasses = { 'className' : this.callback };
<igx-grid #grid [data]="Data" [rowClasses] = "rowClasses" [autoGenerate]="true"></igx-grid>

Memberof

IgxColumnComponent

rowSelectionChanging: EventEmitter<IRowSelectionEventArgs> = ...

IgxGridRowComponent が選択されたときに発生します。

Example

<igx-grid #grid (rowSelectionChanging)="rowSelectionChanging($event)" [data]="localData" [autoGenerate]="true"></igx-grid>
rowStyles: any = null

グリッドの行要素に条件付きスタイル プロパティを設定します。 キーがスタイル プロパティであり、 値が評価用の式であるオブジェクト リテラルを受け入れます。

styles = {
background: 'yellow',
color: (row: RowType) => row.selected : 'red': 'white'
}
<igx-grid #grid [data]="Data" [rowStyles]="styles" [autoGenerate]="true"></igx-grid>

Memberof

IgxColumnComponent

rowToggle: EventEmitter<IRowToggleEventArgs> = ...

行の展開状態が変更されているときに呼び出されます。

Example

<igx-grid [data]="employeeData" (rowToggle)="rowToggle($event)" [autoGenerate]="true"></igx-grid>
selected: EventEmitter<IGridCellEventArgs> = ...

セルが選択されたときに発生します。

Remarks

IgxGridCell を返します。

Example

<igx-grid #grid (selected)="onCellSelect($event)" [data]="localData" [height]="'305px'" [autoGenerate]="true"></igx-grid>
showPivotConfigurationUI: boolean = true
sorting: EventEmitter<ISortingEventArgs> = ...

ソート式が適用される前に発生されます。

Remarks

ISortingEventArgs オブジェクトを返します。sortingExpressions キーは、ソート式を保持します。

Example

<igx-grid #grid [data]="localData" [autoGenerate]="true" (sorting)="sorting($event)"></igx-grid>
sortingDone: EventEmitter<ISortingExpression<any> | ISortingExpression<any>[]> = ...

ソートが UI で実行されたときに発生されます。

Remarks

ソート式を返します。

Example

<igx-grid #grid [data]="localData" [autoGenerate]="true" (sortingDone)="sortingDone($event)"></igx-grid>
sortingExpressionsChange: EventEmitter<ISortingExpression<any>[]> = ...

ソートが実行された前に発生されます。

Remarks

ソート式を返します。

Example

<igx-grid #grid [data]="localData" [autoGenerate]="true" (sortingExpressionsChange)="sortingExprChange($event)"></igx-grid>
uniqueColumnValuesStrategy: ((column: ColumnType, filteringExpressionsTree: IFilteringExpressionsTree, done: ((values: any[]) => void)) => void)

Type declaration

    • (column: ColumnType, filteringExpressionsTree: IFilteringExpressionsTree, done: ((values: any[]) => void)): void
    • Gets/Sets a unique values strategy used by the Excel Style Filtering

      Remarks

      Provides a callback for loading unique column values on demand. If this property is provided, the unique values it generates will be used by the Excel Style Filtering.

      Example

      <igx-grid [data]="localData" [filterMode]="'excelStyleFilter'" [uniqueColumnValuesStrategy]="columnValuesStrategy"></igx-grid>
      

      パラメーター

      返却 void

validation: IgxGridValidationService
validationStatusChange: EventEmitter<IGridValidationStatusEventArgs> = ...

グリッドの検証状態が変更されたときに発生します。

Example

<igx-grid #grid (validationStatusChange)="validationStatusChange($event)" [data]="localData" [height]="'305px'" [autoGenerate]="true"></igx-grid>
validationTrigger: GridValidationTrigger = 'change'

リッドの編集時に使用される検証のトリガーを取得または設定します。

Example

<igx-grid #grid validationTrigger='blur'></igx-grid>
valueChipTemplate: TemplateRef<IgxPivotGridValueTemplateContext>

valueChip のカスタム テンプレートを取得または設定します。

Example

<igx-pivot-grid [valueChipTemplate]="myTemplate"><igx-pivot-grid>
valueInit: EventEmitter<IPivotValue> = ...

値が初期化されるときに発生します。

Remarks

初期化されようとしている値を発生します。

Example

<igx-pivot-grid #grid [data]="localData" [height]="'305px'"
(valueInit)="valueInit($event)"></igx-pivot-grid>
valuesChange: EventEmitter<IValuesChange> = ...

値コレクションがグリッド チップ領域によって変更されたときに発生します。

Remarks

新しいディメンションを返します。

Example

<igx-pivot-grid #grid [data]="localData" [height]="'305px'"
(valuesChange)="valuesChange($event)"></igx-grid>

アクセサー

  • get defaultHeaderGroupMinWidth(): number
  • IgxGridHeaderGroupComponent の最小許容幅を返します。

    Remarks

    ヘッダー グループ コンポーネントの幅を制限するために内部で使用されます。 以下の値は、ヘッダーセルのデフォルトの右/左パディング値に基づいています。

    返却 number

  • get emptyFilteredGridMessage(): string
  • 返却 string

  • set emptyFilteredGridMessage(value: string): void
  • グリッドがフィルターされ、レコードがない場合に表示されるメッセージを取得または設定します。

    Example

    <igx-grid #grid [data]="Data" [emptyGridMessage]="'The grid is empty'" [autoGenerate]="true"></igx-grid>
    

    パラメーター

    • value: string

    返却 void

メソッド

  • 名前が提供された場合、対応する IgxColumnComponent のフィルター状態をクリアします。

    Remarks

    それ以外の場合、すべての IgxColumnComponent のフィルター状態をクリアします。

    Example

    this.grid.clearFilter();
    

    パラメーター

    • オプション name: string

      名前が提供された場合、対応する IgxColumnComponent のフィルター状態をクリアします。

    返却 void

  • 名前が提供された場合、対応する IgxColumnComponent のソート状態をクリアします。

    Remarks

    それ以外の場合、すべての IgxColumnComponent のソート状態をクリアします。

    Example

    this.grid.clearSort();
    

    パラメーター

    • オプション name: string

      名前が提供された場合、対応する IgxColumnComponent のソート状態をクリアします。

    返却 void

  • すべての行を選択解除します。

    Remarks

    フィルタリング機能が有効にされる場合、selectAllRows() および deselectAllRows() はフィルターされた行のみを選択/選択解除します。 onlyFilterData のパラメーターを false に設定すると、削除された行を除き Grid 内のすべての行が選択されます。

    Example

    this.grid.deselectAllRows();
    

    パラメーター

    • onlyFilterData: boolean = true

      すべての行を選択解除します。

    返却 void

  • 単一の IgxColumnComponent をフィルターします。

    Example

    public filter(term) {
    this.grid.filter("ProductName", term, IgxStringFilteringOperand.instance().condition("contains"));
    }

    パラメーター

    • name: string

      単一の IgxColumnComponent をフィルターします。

    • value: any

      単一の IgxColumnComponent をフィルターします。

    • オプション conditionOrExpressionTree: IFilteringOperation | IFilteringExpressionsTree

      単一の IgxColumnComponent をフィルターします。

    • オプション ignoreCase: boolean

      単一の IgxColumnComponent をフィルターします。

    返却 void

  • 同じ条件で IgxGridComponent のすべての IgxColumnComponent をフィルターします。

    Example

    grid.filterGlobal('some', IgxStringFilteringOperand.instance().condition('contains'));
    

    パラメーター

    • value: any

      同じ条件で IgxGridComponent のすべての IgxColumnComponent をフィルターします。

    • condition: any

      同じ条件で IgxGridComponent のすべての IgxColumnComponent をフィルターします。

    • オプション ignoreCase: any

      同じ条件で IgxGridComponent のすべての IgxColumnComponent をフィルターします。

    返却 void

  • 行コンポーネントに含まれているデータを返します。

    Remarks

    プライマリ キーが指定されていない場合、行セレクターは行データと一致します。

    Example

    const data = grid.getRowData(94741);
    

    パラメーター

    • rowSelector: any

      行コンポーネントに含まれているデータを返します。

    返却 any

  • 現在の列選択の配列を [{ column.field: cell.value }, ...] の形式で返します。

    Remarks

    formatters が有効な場合、セル値はそれぞれの列フォーマッタ (もしあれば) によってフォーマットされます。headers が有効な場合、列フィールドの代わりに列ヘッダーがある場合はそれを使います。

    パラメーター

    • formatters: boolean = false
    • headers: boolean = false

    返却 any[]

  • 現在のセル選択の配列を [{ column.field: cell.value }, ...] の形式で返します。

    Remarks

    formatters が有効な場合、セル値はそれぞれの列フォーマッタ (もしあれば) によってフォーマットされます。headers が有効な場合、列フィールドの代わりに列ヘッダーがある場合はそれを使います。

    パラメーター

    • formatters: boolean = false
    • headers: boolean = false

    返却 any[]

  • 指定したインデックスまたはコレクションの最後にタイプによってターゲット コレクションにディメンションを挿入します。

    Example

    this.grid.insertDimensionAt(dimension, PivotDimensionType.Row, 1);
    

    パラメーター

    • dimension: IPivotDimension

      指定したインデックスまたはコレクションの最後にタイプによってターゲット コレクションにディメンションを挿入します。

    • targetCollectionType: PivotDimensionType

      指定したインデックスまたはコレクションの最後にタイプによってターゲット コレクションにディメンションを挿入します。

    • オプション index: number

      指定したインデックスまたはコレクションの最後にタイプによってターゲット コレクションにディメンションを挿入します。

    返却 void

  • IgxGridComponent の変更検出をトリガーします。 markForCheck を呼び出すと、グリッドのパイプも明示的にトリガーされ、すべての更新が処理されます。 不要なときに使用したり、誤用したりすると、パフォーマンスが低下する可能性があります。

    // 注意事項
    // ループ内から markForCheck を呼び出さないでください。
    // プリミティブが変更されたときに markForCheck を呼び出さないでください。
    grid.data.forEach(rec => {
    rec = newValue;
    grid.markForCheck();
    });

    // 注意事項
    // ネストされたプロパティを更新した後に markForCheck を呼び出します。
    grid.data.forEach(rec => {
    rec.nestedProp1.nestedProp2 = newValue;
    });
    grid.markForCheck();

    Example

    grid.markForCheck();
    

    返却 void

  • 指定したインデックスまたはコレクションの最後にあるタイプによって、現在のコレクションから指定したターゲット コレクションにディメンションを移動します。

    Example

    this.grid.moveDimension(dimension, PivotDimensionType.Row, 1);
    

    パラメーター

    • dimension: IPivotDimension

      指定したインデックスまたはコレクションの最後にあるタイプによって、現在のコレクションから指定したターゲット コレクションにディメンションを移動します。

    • targetCollectionType: PivotDimensionType

      指定したインデックスまたはコレクションの最後にあるタイプによって、現在のコレクションから指定したターゲット コレクションにディメンションを移動します。

    • オプション index: number

      指定したインデックスまたはコレクションの最後にあるタイプによって、現在のコレクションから指定したターゲット コレクションにディメンションを移動します。

    返却 void

  • 現在指定されたインデックス位置または末尾から値を移動します。

    Example

    this.grid.moveValue(value, 1);
    

    パラメーター

    • value: IPivotValue

      現在指定されたインデックス位置または末尾から値を移動します。

    • オプション index: number

      現在指定されたインデックス位置または末尾から値を移動します。

    返却 void

  • rowindexvisibleColumnIndex に基づいてグリッド内の位置に移動します。

    Remarks

    { targetType: GridKeydownTargetType, target: Object } を受け入れるコールバック関数を通してターゲット要素上で カスタム ロジックを実行することもできます。

    Example

     this.grid.navigateTo(10, 3, (args) => { args.target.nativeElement.focus(); });
    

    パラメーター

    • rowIndex: number
    • visibleColIndex: number = -1
    • cb: ((args: any) => void) = null
        • (args: any): void
        • パラメーター

          • args: any

          返却 void

    返却 void

  • 現在のコレクションからディメンションを削除します。

    Remarks

    これは、ディメンションを有効/無効にする toggleDimension とは異なります。 指定したディメンションをコレクションから完全に削除します。

    Example

    this.grid.removeDimension(dimension);
    

    パラメーター

    • dimension: IPivotDimension

      現在のコレクションからディメンションを削除します。

    返却 void

  • すべての行を選択します。

    Remarks

    フィルタリング機能が有効にされる場合、selectAllRows() および deselectAllRows() はフィルターされた行のみを選択/選択解除します。 onlyFilterData のパラメーターを false に設定すると、削除された行を除き Grid 内のすべての行が選択されます。

    Example

    this.grid.selectAllRows();
    this.grid.selectAllRows(false);

    パラメーター

    • onlyFilterData: boolean = true

      すべての行を選択します。

    返却 void

  • 指定した行を ID によって選択します。

    Example

    this.grid.selectRows([1,2,5], true);
    

    パラメーター

    • rowIDs: any[]

      指定した行を ID によって選択します。

    • オプション clearCurrentSelection: boolean

      指定した行を ID によって選択します。

    返却 void

  • ID によって行を切り替えます。

    Remarks

    行 ID - primaryKey 値またはデータ レコード インスタンスです。

    Example

    this.grid.toggleRow(rowID);
    

    パラメーター

    • rowID: any

      ID によって行を切り替えます。

    返却 void