igniteui-react-grids
Version:
Ignite UI React grid components.
577 lines (571 loc) • 21.7 kB
TypeScript
import { IgrGridColumnAnimationSettings } from "./igr-grid-column-animation-settings";
import { IgrColumnWidth } from "./igr-column-width";
import { IgrHeader } from "./igr-header";
import { ColumnSortDirection } from "./ColumnSortDirection";
import { PinnedPositions } from "./PinnedPositions";
import { ColumnOptionsIconAlignment } from "./ColumnOptionsIconAlignment";
import { ColumnOptionsIconBehavior } from "./ColumnOptionsIconBehavior";
import { MergedCellMode } from "./MergedCellMode";
import { MergedCellEvaluationCriteria } from "./MergedCellEvaluationCriteria";
import { CellContentVerticalAlignment } from "./CellContentVerticalAlignment";
import { FilterComparisonType } from "./FilterComparisonType";
import { IgrGridFilterOperandsCollection } from "./igr-grid-filter-operands-collection";
import { CellPropertyAnimationType } from "./CellPropertyAnimationType";
import { IgrDefinitionBase, IIgrDefinitionBaseProps } from "./igr-definition-base";
import { DataGridColumn } from "./DataGridColumn";
import { ColumnFilterCondition } from "./ColumnFilterCondition";
import { IFilterExpression } from "igniteui-react-core";
import { ToolActionInfo } from "igniteui-react-core";
import { ICommandAvailabilityListener } from "igniteui-react-core";
import { ICommandStateChangedListener } from "igniteui-react-core";
/**
* A column in the data grid.
*/
export declare abstract class IgrDataGridColumn<P extends IIgrDataGridColumnProps = IIgrDataGridColumnProps> extends IgrDefinitionBase<P> {
/**
* @hidden
*/
get i(): DataGridColumn;
constructor(props: P);
/**
* Gets or sets the amount of left padding to use for the cell content for this column.
*/
get paddingLeft(): number;
set paddingLeft(v: number);
/**
* Gets or sets the amount of top padding to use for the cell content for this column.
*/
get paddingTop(): number;
set paddingTop(v: number);
/**
* Gets or sets the amount of right padding to use for the cell content of this column.
*/
get paddingRight(): number;
set paddingRight(v: number);
/**
* Gets or sets the amount of bottom padding to use for the cell content of this column.
*/
get paddingBottom(): number;
set paddingBottom(v: number);
/**
* Gets or sets an unique name of the Column
*/
get name(): string;
set name(v: string);
/**
* Gets or sets the key used for the column binding
*/
get field(): string;
set field(v: string);
/**
* Gets or sets the text displayed in the header of the column
*/
get headerText(): string;
set headerText(v: string);
/**
* Gets the actual text displayed in the header of the column
*/
get actualHeaderText(): string;
set actualHeaderText(v: string);
/**
* Gets or sets the background color to use for the cells when they are selected
*/
get selectedBackground(): string;
set selectedBackground(v: string);
/**
* Gets the actual background color that is used for the cells when they are selected
*/
get actualSelectedBackground(): string;
set actualSelectedBackground(v: string);
/**
* Gets or sets the background color to use for the cells when the row is hovered.
*/
get rowHoverBackground(): string;
set rowHoverBackground(v: string);
/**
* Gets the actual background color that is used for the cells when they are hovered.
*/
get actualHoverBackground(): string;
set actualHoverBackground(v: string);
/**
* Gets or sets the text color to use for the cells when the row is hovered.
*/
get rowHoverTextColor(): string;
set rowHoverTextColor(v: string);
/**
* Gets the actual text color that is used for the cells when they are hovered.
*/
get actualRowHoverTextColor(): string;
set actualRowHoverTextColor(v: string);
/**
* Gets or sets the animation settings to use for this column.
*/
get animationSettings(): IgrGridColumnAnimationSettings;
set animationSettings(v: IgrGridColumnAnimationSettings);
/**
* Gets or sets the width to use for this column.
*/
get width(): IgrColumnWidth;
set width(v: IgrColumnWidth);
/**
* Gets or sets the minimum width to use for this column. Overrides the DefaultColumnMinWidth from the grid, if set.
*/
get minWidth(): number;
set minWidth(v: number);
/**
* Gets whether this column was projected from markup/templates and is constrained.
*/
get isFromMarkup(): boolean;
set isFromMarkup(v: boolean);
/**
* Gets whether this column was auto generated.
*/
get isAutoGenerated(): boolean;
set isAutoGenerated(v: boolean);
/**
* Gets or sets a filter to apply on the values of this column
*/
get filter(): ColumnFilterCondition;
set filter(v: ColumnFilterCondition);
/**
* Gets or sets a filter to apply to the values of this column.
*/
get filterExpression(): IFilterExpression;
set filterExpression(v: IFilterExpression);
/**
* Gets or sets the header definition for this column.
*/
get header(): IgrHeader;
set header(v: IgrHeader);
/**
* Gets or sets whether filtering is enabled for this column.
*/
get isFilteringEnabled(): boolean;
set isFilteringEnabled(v: boolean);
/**
* Gets or sets whether resizing is enabled for this column.
*/
get isResizingEnabled(): boolean;
set isResizingEnabled(v: boolean);
/**
* Gets or sets whether or not a column is hidden from the grid
*/
get isHidden(): boolean;
set isHidden(v: boolean);
/**
* Gets or sets if a column should be removed from the grid when it is fully hidden
*/
get shouldRemoveWhenHidden(): boolean;
set shouldRemoveWhenHidden(v: boolean);
/**
* Gets the current sort direction (None, Ascending, Descending) for this column.
*/
get sortDirection(): ColumnSortDirection;
set sortDirection(v: ColumnSortDirection);
/**
* Gets or sets the current fixed position for this column.
*/
get pinned(): PinnedPositions;
set pinned(v: PinnedPositions);
/**
* Gets the actual column options icon alignment for this column.
*/
get actualColumnOptionsIconAlignment(): ColumnOptionsIconAlignment;
set actualColumnOptionsIconAlignment(v: ColumnOptionsIconAlignment);
/**
* Gets or sets whether the column options icon is aligned opposite the header text or not.
*/
get columnOptionsIconAlignment(): ColumnOptionsIconAlignment;
set columnOptionsIconAlignment(v: ColumnOptionsIconAlignment);
/**
* Gets the actual column options icon color for this column.
*/
get actualColumnOptionsIconColor(): string;
set actualColumnOptionsIconColor(v: string);
/**
* Gets or sets the column options icon color for this column.
*/
get columnOptionsIconColor(): string;
set columnOptionsIconColor(v: string);
/**
* Gets or sets how the column option icon will behave in the column header.
*/
get columnOptionsIconBehavior(): ColumnOptionsIconBehavior;
set columnOptionsIconBehavior(v: ColumnOptionsIconBehavior);
/**
* Gets or sets how the column option icon will behave in the column header.
*/
get actualColumnOptionsIconBehavior(): ColumnOptionsIconBehavior;
set actualColumnOptionsIconBehavior(v: ColumnOptionsIconBehavior);
/**
* Gets the actual state of the column options for this column.
*/
get actualIsColumnOptionsEnabled(): boolean;
set actualIsColumnOptionsEnabled(v: boolean);
/**
* Gets or sets the preferred state of the column options for this column. If the feature is disabled at the grid level
* then it will be disabled for the column regardless of what this is set to.
*/
get isColumnOptionsEnabled(): boolean;
set isColumnOptionsEnabled(v: boolean);
/**
* Gets the actual state of summaries menu in the column options for this column.
*/
get actualIsColumnOptionsSummariesEnabled(): boolean;
set actualIsColumnOptionsSummariesEnabled(v: boolean);
/**
* Gets or sets whether to show the summaries option in the column options menu for this column.
*/
get isColumnOptionsSummariesEnabled(): boolean;
set isColumnOptionsSummariesEnabled(v: boolean);
/**
* Gets the actual state of grouping menu in the column options for this column.
*/
get actualIsColumnOptionsGroupingEnabled(): boolean;
set actualIsColumnOptionsGroupingEnabled(v: boolean);
/**
* Gets or sets whether to show the grouping option in the column options menu for this column.
*/
get isColumnOptionsGroupingEnabled(): boolean;
set isColumnOptionsGroupingEnabled(v: boolean);
/**
* Gets or sets if the column is editable.
*/
get isEditable(): boolean;
set isEditable(v: boolean);
/**
* Gets or sets the text color used for deleted rows.
*/
get deletedTextColor(): string;
set deletedTextColor(v: string);
/**
* Gets the actual text color used for deleted rows.
*/
get actualDeletedTextColor(): string;
set actualDeletedTextColor(v: string);
/**
* Gets or sets the opacity to use for unsaved edited cell values.
*/
get editOpacity(): number;
set editOpacity(v: number);
/**
* Gets the actual opacity for unsaved edited cell values.
*/
get actualEditOpacity(): number;
set actualEditOpacity(v: number);
/**
* Gets or sets the font style to use for unsaved cell edits.
*/
get textEditStyle(): string;
set textEditStyle(v: string);
/**
* Gets the actual font style used for unsaved cell edits.
*/
get actualEditFontInfo(): string;
set actualEditFontInfo(v: string);
/**
* Gets or sets if and how cell merging is performed for this field.
*/
get mergedCellMode(): MergedCellMode;
set mergedCellMode(v: MergedCellMode);
/**
* Gets or sets how cells are evaluated for merging.
*/
get mergedCellEvaluationCriteria(): MergedCellEvaluationCriteria;
set mergedCellEvaluationCriteria(v: MergedCellEvaluationCriteria);
/**
* Gets or sets the vertical alignment to use for the merged cell content.
*/
get mergedCellVerticalAlignment(): CellContentVerticalAlignment;
set mergedCellVerticalAlignment(v: CellContentVerticalAlignment);
/**
* Gets or sets the amount of left padding to use for the cell content for this column.
*/
get mergedCellPaddingLeft(): number;
set mergedCellPaddingLeft(v: number);
/**
* Gets or sets the amount of top padding to use for the cell content for this column.
*/
get mergedCellPaddingTop(): number;
set mergedCellPaddingTop(v: number);
/**
* Gets or sets the amount of right padding to use for the cell content of this column.
*/
get mergedCellPaddingRight(): number;
set mergedCellPaddingRight(v: number);
/**
* Gets or sets the amount of bottom padding to use for the cell content of this column.
*/
get mergedCellPaddingBottom(): number;
set mergedCellPaddingBottom(v: number);
/**
* Gets or sets whether UI filters are case sensitive or not.
*/
get filterComparisonType(): FilterComparisonType;
set filterComparisonType(v: FilterComparisonType);
private _filterOperands;
/**
* Gets a list of the current custom filters for this column.
*/
get filterOperands(): IgrGridFilterOperandsCollection;
set filterOperands(v: IgrGridFilterOperandsCollection);
findByName(name: string): any;
protected _styling(container: any, component: any, parent?: any): void;
/**
* Get the unique key used to identify this column.
*/
getUniqueKey(): string;
setNamedHeaderValue(valueName: string, animationType: CellPropertyAnimationType, value: any): void;
/**
* Returns if the column has named header values.
*/
hasNamedHeaderValues(): boolean;
/**
* Returns if there is a named header value with a given name.
* @param valueName * The named value to check for.
*/
hasNamedHeaderValue(valueName: string): boolean;
/**
* Removes a named header value with the given name from the named header values for this column.
* @param valueName * The named header value to remove.
*/
removeNamedHeaderValue(valueName: string): void;
/**
* Gets the value of a named header value for this column by name.
* @param valueName * Name of the named header value to retrieve.
*/
getNamedHeaderValue(valueName: string): any;
applyCustomFilter(filterID: string, index: number, value: any): void;
getDesiredToolbarActions(): ToolActionInfo[];
addCommandAvailabilityListener(listener: ICommandAvailabilityListener): void;
removeCommandAvailabilityListener(listener: ICommandAvailabilityListener): void;
addCommandStateChangedListener(listener: ICommandStateChangedListener): void;
removeCommandStateChangedListener(listener: ICommandStateChangedListener): void;
private _actualHeaderTextChange;
private _actualHeaderTextChange_wrapped;
get actualHeaderTextChange(): (s: IgrDataGridColumn, e: string) => void;
set actualHeaderTextChange(ev: (s: IgrDataGridColumn, e: string) => void);
}
export interface IIgrDataGridColumnProps extends IIgrDefinitionBaseProps {
/**
* Gets or sets the amount of left padding to use for the cell content for this column.
*/
paddingLeft?: number | string;
/**
* Gets or sets the amount of top padding to use for the cell content for this column.
*/
paddingTop?: number | string;
/**
* Gets or sets the amount of right padding to use for the cell content of this column.
*/
paddingRight?: number | string;
/**
* Gets or sets the amount of bottom padding to use for the cell content of this column.
*/
paddingBottom?: number | string;
/**
* Gets or sets an unique name of the Column
*/
name?: string;
/**
* Gets or sets the key used for the column binding
*/
field?: string;
/**
* Gets or sets the text displayed in the header of the column
*/
headerText?: string;
/**
* Gets the actual text displayed in the header of the column
*/
actualHeaderText?: string;
/**
* Gets or sets the background color to use for the cells when they are selected
*/
selectedBackground?: string;
/**
* Gets the actual background color that is used for the cells when they are selected
*/
actualSelectedBackground?: string;
/**
* Gets or sets the background color to use for the cells when the row is hovered.
*/
rowHoverBackground?: string;
/**
* Gets the actual background color that is used for the cells when they are hovered.
*/
actualHoverBackground?: string;
/**
* Gets or sets the text color to use for the cells when the row is hovered.
*/
rowHoverTextColor?: string;
/**
* Gets the actual text color that is used for the cells when they are hovered.
*/
actualRowHoverTextColor?: string;
/**
* Gets or sets the animation settings to use for this column.
*/
animationSettings?: IgrGridColumnAnimationSettings;
/**
* Gets or sets the width to use for this column.
*/
width?: IgrColumnWidth | string;
/**
* Gets or sets the minimum width to use for this column. Overrides the DefaultColumnMinWidth from the grid, if set.
*/
minWidth?: number | string;
/**
* Gets whether this column was projected from markup/templates and is constrained.
*/
isFromMarkup?: boolean | string;
/**
* Gets whether this column was auto generated.
*/
isAutoGenerated?: boolean | string;
/**
* Gets or sets a filter to apply on the values of this column
*/
filter?: ColumnFilterCondition;
/**
* Gets or sets a filter to apply to the values of this column.
*/
filterExpression?: IFilterExpression;
/**
* Gets or sets the header definition for this column.
*/
header?: IgrHeader;
/**
* Gets or sets whether filtering is enabled for this column.
*/
isFilteringEnabled?: boolean | string;
/**
* Gets or sets whether resizing is enabled for this column.
*/
isResizingEnabled?: boolean | string;
/**
* Gets or sets whether or not a column is hidden from the grid
*/
isHidden?: boolean | string;
/**
* Gets or sets if a column should be removed from the grid when it is fully hidden
*/
shouldRemoveWhenHidden?: boolean | string;
/**
* Gets the current sort direction (None, Ascending, Descending) for this column.
*/
sortDirection?: ColumnSortDirection | string;
/**
* Gets or sets the current fixed position for this column.
*/
pinned?: PinnedPositions | string;
/**
* Gets the actual column options icon alignment for this column.
*/
actualColumnOptionsIconAlignment?: ColumnOptionsIconAlignment | string;
/**
* Gets or sets whether the column options icon is aligned opposite the header text or not.
*/
columnOptionsIconAlignment?: ColumnOptionsIconAlignment | string;
/**
* Gets the actual column options icon color for this column.
*/
actualColumnOptionsIconColor?: string;
/**
* Gets or sets the column options icon color for this column.
*/
columnOptionsIconColor?: string;
/**
* Gets or sets how the column option icon will behave in the column header.
*/
columnOptionsIconBehavior?: ColumnOptionsIconBehavior | string;
/**
* Gets or sets how the column option icon will behave in the column header.
*/
actualColumnOptionsIconBehavior?: ColumnOptionsIconBehavior | string;
/**
* Gets the actual state of the column options for this column.
*/
actualIsColumnOptionsEnabled?: boolean | string;
/**
* Gets or sets the preferred state of the column options for this column. If the feature is disabled at the grid level
* then it will be disabled for the column regardless of what this is set to.
*/
isColumnOptionsEnabled?: boolean | string;
/**
* Gets the actual state of summaries menu in the column options for this column.
*/
actualIsColumnOptionsSummariesEnabled?: boolean | string;
/**
* Gets or sets whether to show the summaries option in the column options menu for this column.
*/
isColumnOptionsSummariesEnabled?: boolean | string;
/**
* Gets the actual state of grouping menu in the column options for this column.
*/
actualIsColumnOptionsGroupingEnabled?: boolean | string;
/**
* Gets or sets whether to show the grouping option in the column options menu for this column.
*/
isColumnOptionsGroupingEnabled?: boolean | string;
/**
* Gets or sets if the column is editable.
*/
isEditable?: boolean | string;
/**
* Gets or sets the text color used for deleted rows.
*/
deletedTextColor?: string;
/**
* Gets the actual text color used for deleted rows.
*/
actualDeletedTextColor?: string;
/**
* Gets or sets the opacity to use for unsaved edited cell values.
*/
editOpacity?: number | string;
/**
* Gets the actual opacity for unsaved edited cell values.
*/
actualEditOpacity?: number | string;
/**
* Gets or sets the font style to use for unsaved cell edits.
*/
textEditStyle?: string;
/**
* Gets the actual font style used for unsaved cell edits.
*/
actualEditFontInfo?: string;
/**
* Gets or sets if and how cell merging is performed for this field.
*/
mergedCellMode?: MergedCellMode | string;
/**
* Gets or sets how cells are evaluated for merging.
*/
mergedCellEvaluationCriteria?: MergedCellEvaluationCriteria | string;
/**
* Gets or sets the vertical alignment to use for the merged cell content.
*/
mergedCellVerticalAlignment?: CellContentVerticalAlignment | string;
/**
* Gets or sets the amount of left padding to use for the cell content for this column.
*/
mergedCellPaddingLeft?: number | string;
/**
* Gets or sets the amount of top padding to use for the cell content for this column.
*/
mergedCellPaddingTop?: number | string;
/**
* Gets or sets the amount of right padding to use for the cell content of this column.
*/
mergedCellPaddingRight?: number | string;
/**
* Gets or sets the amount of bottom padding to use for the cell content of this column.
*/
mergedCellPaddingBottom?: number | string;
/**
* Gets or sets whether UI filters are case sensitive or not.
*/
filterComparisonType?: FilterComparisonType | string;
}