本文整理匯總了TypeScript中igniteui-angular.IgxGridComponent類的典型用法代碼示例。如果您正苦於以下問題:TypeScript IgxGridComponent類的具體用法?TypeScript IgxGridComponent怎麽用?TypeScript IgxGridComponent使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了IgxGridComponent類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: onInput
public onInput(input: any, column: IgxColumnComponent) {
let operand = null;
switch (column.dataType) {
case DataType.Number:
operand = IgxNumberFilteringOperand.instance().condition('equals');
case DataType.Date:
operand = IgxDateFilteringOperand.instance().condition('equals');
default:
operand = IgxStringFilteringOperand.instance().condition('contains');
}
this.grid1.filter(column.field, input.value, operand, column.filteringIgnoreCase);
}
示例2: toggleVisibility
toggleVisibility(name: string) {
const col = this.grid1.getColumnByName(name);
col.hidden = !col.hidden;
}
示例3: toggleColumn
toggleColumn(name: string) {
const col = this.grid1.getColumnByName(name);
col.pinned = !col.pinned;
}
示例4: toggleColumn
toggleColumn(name: string) {
const col = this.grid1.getColumnByName(name);
col.pinned ? col.pinned = false : col.pinned = true;
}
示例5: clearInput
public clearInput(input: any, column: any) {
input.value = null;
this.grid1.clearFilter(column.field);
}
示例6: filter
public filter(term) {
this.grid1.filter("ProductName", term, IgxStringFilteringOperand.instance().condition("contains"));
}