WjFlexGridColumn Class

File
wijmo.angular2.js
Module
wijmo/wijmo.angular2.grid
Base Class
Column
Show
   

Angular 2 component for the Column control.

The wj-flex-grid-column component must be contained in a WjFlexGrid component.

Use the wj-flex-grid-column component to add Column controls to your Angular 2 applications. For details about Angular 2 markup syntax, see Angular 2 Markup.

The WjFlexGridColumn component is derived from the Column control and inherits all its properties, events and methods.

The wj-flex-grid-column component may contain a WjFlexGridCellTemplate child directive.

Constructor

Properties

Methods

Constructor

constructor

constructor(options?: any): Column

Initializes a new instance of the Column class.

Parameters
Inherited From
Column
Returns
Column

Properties

aggregate

Gets or sets the Aggregate to display in the group header rows for the column.

Inherited From
Column
Type
Aggregate

align

Gets or sets the horizontal alignment of items in the column.

The default value for this property is null, which causes the grid to select the alignment automatically based on the column's dataType (numbers are right-aligned, Boolean values are centered, and other types are left-aligned).

If you want to override the default alignment, set this property to 'left,' 'right,' or 'center,'

Inherited From
Column
Type
string

allowDragging

Gets or sets a value that indicates whether the user can move the row or column to a new position with the mouse.

Inherited From
RowCol
Type
boolean

allowMerging

Gets or sets a value that indicates whether cells in the row or column can be merged.

Inherited From
RowCol
Type
boolean

allowResizing

Gets or sets a value that indicates whether the user can resize the row or column with the mouse.

Inherited From
RowCol
Type
boolean

allowSorting

Gets or sets a value that indicates whether the user can sort the column by clicking its header.

Inherited From
Column
Type
boolean

binding

Gets or sets the name of the property the column is bound to.

Inherited From
Column
Type
string

collectionView

Gets the ICollectionView bound to this row or column.

Inherited From
RowCol
Type
ICollectionView

cssClass

Gets or sets a CSS class name to use when rendering non-header cells in the row or column.

Inherited From
RowCol
Type
string

currentSort

Gets a string that describes the current sorting applied to the column. Possible values are '+' for ascending order, '-' for descending order, or null for unsorted columns.

Inherited From
Column
Type
string

dataMap

Gets or sets the DataMap used to convert raw values into display values for the column.

Columns with an associated dataMap show drop-down buttons that can be used for quick editing. If you do not want to show the drop-down buttons, set the column's showDropDown property to false.

Cell drop-downs require the wijmo.input module to be loaded.

Inherited From
Column
Type
DataMap

dataType

Gets or sets the type of value stored in the column.

Values are coerced into the proper type when editing the grid.

Inherited From
Column
Type
DataType

format

Gets or sets the format string used to convert raw values into display values for the column (see Globalize).

Inherited From
Column
Type
string

grid

Gets the FlexGrid that owns the row or column.

Inherited From
RowCol
Type
FlexGrid

index

Gets the index of the row or column in the parent collection.

Inherited From
RowCol
Type
number

initialized

This event is triggered after the component has been initialized by Angular, that is all bound properties have been assigned and child components (if any) have been initialized.

Type
EventEmitter

inputType

Gets or sets the "type" attribute of the HTML input element used to edit values in this column.

By default, this property is set to "tel" for numeric columns, and to "text" for all other non-boolean column types. The "tel" input type causes mobile devices to show a numeric keyboard that includes a negative sign and a decimal separator.

Use this property to change the default setting if the default does not work well for the current culture, device, or application. In these cases, try setting the property to "number" or simply "text."

Inherited From
Column
Type
string

isContentHtml

Gets or sets a value that indicates whether cells in this row or column contain HTML content rather than plain text.

Inherited From
RowCol
Type
boolean

isInitialized

Indicates whether the component has been initialized by Angular. Changes its value from false to true right before triggering the initialized event.

Type
boolean

isReadOnly

Gets or sets a value that indicates whether cells in the row or column can be edited.

Inherited From
RowCol
Type
boolean

isRequired

Gets or sets a value that determines whether values in the column are required.

By default, this property is set to null, which means values are required, but non-masked string columns may contain empty strings.

When set to true, values are required and empty strings are not allowed.

When set to false, null values and empty strings are allowed.

Inherited From
Column
Type
boolean

isSelected

Gets or sets a value that indicates whether the row or column is selected.

Inherited From
RowCol
Type
boolean

isVisible

Gets a value that indicates whether the row or column is visible and not collapsed.

This property is read-only. To change the visibility of a row or column, use the visible property instead.

Inherited From
RowCol
Type
boolean

mask

Gets or sets a mask to use while editing values in this column.

The mask format is the same used by the InputMask control.

If specified, the mask must be compatible with the value of the format property. For example, the mask '99/99/9999' can be used for entering dates formatted as 'MM/dd/yyyy'.

Inherited From
Column
Type
string

maxWidth

Gets or sets the maximum width of the column.

Inherited From
Column
Type
number

minWidth

Gets or sets the minimum width of the column.

Inherited From
Column
Type
number

name

Gets or sets the name of the column.

The column name can be used to retrieve the column using the getColumn method.

Inherited From
Column
Type
string

pos

Gets the position of the row or column.

Inherited From
RowCol
Type
number

renderSize

Gets the render size of the row or column. This property accounts for visibility, default size, and min and max sizes.

Inherited From
RowCol
Type
number

renderWidth

Gets the render width of the column.

The value returned takes into account the column's visibility, default size, and min and max sizes.

Inherited From
Column
Type
number

showDropDown

Gets or sets a value that indicates whether the grid adds drop-down buttons to the cells in this column.

The drop-down buttons are shown only if the column has a dataMap set and is editable. Clicking on the drop-down buttons causes the grid to show a list where users can select the value for the cell.

Cell drop-downs require the wijmo.input module to be loaded.

Inherited From
Column
Type
boolean

size

Gets or sets the size of the row or column. Setting this property to null or negative values causes the element to use the parent collection's default size.

Inherited From
RowCol
Type
number

sortMemberPath

Gets or sets the name of the property to use when sorting this column.

Use this property in cases where you want the sorting to be performed based on values other than the ones specified by the binding property.

Setting this property is null causes the grid to use the value of the binding property to sort the column.

Inherited From
Column
Type
string

visible

Gets or sets a value that indicates whether the row or column is visible.

Inherited From
RowCol
Type
boolean

width

Gets or sets the width of the column.

Column widths may be positive numbers (sets the column width in pixels), null or negative numbers (uses the collection's default column width), or strings in the format '{number}*' (star sizing).

The star-sizing option performs a XAML-style dynamic sizing where column widths are proportional to the number before the star. For example, if a grid has three columns with widths "100", "*", and "3*", the first column will be 100 pixels wide, the second will take up 1/4th of the remaining space, and the last will take up the remaining 3/4ths of the remaining space.

Star-sizing allows you to define columns that automatically stretch to fill the width available. For example, set the width of the last column to "*" and it will automatically extend to fill the entire grid width so there's no empty space. You may also want to set the column's minWidth property to prevent the column from getting too narrow.

Inherited From
Column
Type
any

wjProperty

Gets or sets a name of a property that this component is assigned to. Default value is 'columns'.

Type
string

wordWrap

Gets or sets a value that indicates whether cells in the row or column wrap their content.

Inherited From
RowCol
Type
boolean

Methods

created

created(): void

If you create a custom component inherited from a Wijmo component, you can override this method and perform necessary initializations that you usually do in a class constructor. This method is called in the last line of a Wijmo component constructor and allows you to not declare your custom component's constructor at all, thus preventing you from a necessity to maintain constructor parameters and keep them in synch with Wijmo component's constructor parameters.

Returns
void

getAlignment

getAlignment(): string

Gets the actual column alignment.

Returns the value of the align property if it is not null, or selects the alignment based on the column's dataType.

Inherited From
Column
Returns
string

getIsRequired

getIsRequired(): boolean

Gets a value that determines whether the column is required.

Returns the value of the isRequired property if it is not null, or determines the required status based on the column's dataType.

By default, string columns are not required unless they have an associated dataMap or mask; all other data types are required.

Inherited From
Column
Returns
boolean

onPropertyChanged

onPropertyChanged(): void

Marks the owner list as dirty and refreshes the owner grid.

Inherited From
RowCol
Returns
void