0
Wijmo FlexGrid를 원하시는 경우 은 전체 너비를 커버해야합니다. 나는 동적으로 열을 할당하고있어으로Wijmo flexgrid 열 너비 angular2
그래서 [width]="'*'"
Wijmo FlexGrid를 원하시는 경우 은 전체 너비를 커버해야합니다. 나는 동적으로 열을 할당하고있어으로Wijmo flexgrid 열 너비 angular2
그래서 [width]="'*'"
그리드에 template reference variable을 할당 할 수 없습니다. 예 : flex1
<wj-flex-grid #flex1
[itemsSource]="data">
<wj-flex-grid>
그런 다음 ngAfterViewInit
콜백에 열을 설정하고 해당 열을 폭 '*'
, 예를 할당
import { Component, ViewChild, AfterViewInit } from '@angular/core';
import { Collection } from 'wijmo/wijmo';
import { FlexGrid } from 'wijmo/wijmo.grid';
@Component({ ... })
export class MyComponent implements AfterViewInit {
@ViewChild('flex1') protected grid: FlexGrid;
protected data: any;
constructor() {
this.data = new Collection([
{ id: 1, country: 'United States' },
{ id: 2, country: 'Germany' },
]);
}
public ngAfterViewInit() {
// Missing part: Set up columns programmatically
// OP has done this already.
// Set the column width of the column with binding to the `country` property
this.grid.columns.getColumn('country').width = '*';
}
}