ASP.NET Core MVC Controls | ComponentOne
In This Topic
    RowColCollection Class
    In This Topic
    File
    wijmo.grid.js
    Module
    wijmo.grid
    Base Class
    RowCol
    Derived Classes
    ColumnCollection, RowCollection

    Abstract class that serves as a base for row and column collections.

    Constructor

    constructor

    constructor(g: FlexGrid, defaultSize: number): RowColCollection
    

    Initializes a new instance of the RowColCollection class.

    Parameters
    • g: FlexGrid

      The FlexGrid that owns the collection.

    • defaultSize: number

      The default size of the elements in the collection.

    Returns
    RowColCollection

    Properties

    align

    Gets or sets the horizontal alignment of cells in the column or row.

    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', 'center', or 'justify'.

    Inherited From
    RowCol
    Type
    string

    allowDragging

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

    The default value for this property is **true**.

    Inherited From
    RowCol
    Type
    boolean

    allowMerging

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

    The default value for this property is **false**.

    Inherited From
    RowCol
    Type
    boolean

    allowResizing

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

    The default value for this property is **true**.

    Inherited From
    RowCol
    Type
    boolean

    binding

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

    The default value for this property is **null**, which means the column is not bound to any data fields.

    This property is set automatically for auto-generated columns (see autoGenerateColumns).

    Inherited From
    RowCol
    Type
    string

    collectionView

    Gets the ICollectionView bound to this column or row.

    Inherited From
    RowCol
    Type
    ICollectionView

    cssClass

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

    The default value for this property is **null**.

    Inherited From
    RowCol
    Type
    string

    cssClassAll

    Gets or sets a CSS class name to use when rendering all cells (data and headers) in the column or row.

    This property is also supported on the parent column group header.

    The default value for this property is **null**.

    Inherited From
    RowCol
    Type
    string

    dataMap

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

    By default, data-mapped cells have drop-down lists that can be used for quick editing. You can change the type of editor by setting the column's dataMapEditor property.

    The default value for this property is **null**.

    Inherited From
    RowCol
    Type
    DataMap

    dataMapEditor

    Gets or sets a value that indicates the type of editor to use when editing data-mapped cells in this column or row.

    The default value for this property is DropDownList, which adds drop-down buttons to cells to columns that have a dataMap and are not read-only.

    Clicking on the drop-down buttons causes the grid to show a list where users can select the value for the cell.

    The RadioButtons setting causes the grid to show radio buttons for each option. The buttons can be clicked with the mouse or keyboard (by pressing each option's initial letter or the space key to cycle through the options.)

    Note that drop-down lists are available only if the **wijmo.input.ListBox** class is loaded/imported by the application.

    Inherited From
    RowCol
    Type
    DataMapEditor

    dataType

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

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

    The default value for this property is **null**, which causes the grid not to perform any data type coercion.

    This property is set automatically for auto-generated columns (see autoGenerateColumns).

    Inherited From
    RowCol
    Type
    DataType

    defaultSize

    Gets or sets the default size of elements in the collection.

    Type
    number

    format

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

    The default value for this property is **null**, which causes the grid to use default formats that depend on the data type.

    Inherited From
    RowCol
    Type
    string

    frozen

    Gets or sets the number of frozen rows or columns in the collection.

    Frozen rows and columns do not scroll, and instead remain at the top or left of the grid, next to the fixed cells. Unlike fixed cells, however, frozen cells may be selected and edited like regular cells.

    Type
    number

    grid

    Gets the FlexGrid that owns this collection.

    Type
    FlexGrid

    index

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

    Inherited From
    RowCol
    Type
    number

    inputType

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

    The default value for this property is **null**, which causes the grid to use the type "tel" for numeric columns, and "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
    RowCol
    Type
    string

    isContentHtml

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

    This property only applies to regular cells. Row and column header cells contain plain text by default. If you want to display HTML in column or row headers, you must use the FlexGrid.formatItem event and set the cell's innerHTML content in code.

    Unless the column's isReadOnly property is set to true, cells that show HTML can be edited. By default, the editor will show HTML markup and users will be able to change it. If the column has a dataMap, however, the drop-down list will show formatted items and the editor will show plain text instead of HTML markup.

    The default value for this property is **false**.

    Inherited From
    RowCol
    Type
    boolean

    isReadOnly

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

    The default value for this property is **false**.

    Inherited From
    RowCol
    Type
    boolean

    isRequired

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

    The default value for this property is to **null**, which means dates, booleans, and numeric 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
    RowCol
    Type
    boolean

    isSelected

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

    The default value for this property is **false**.

    Inherited From
    RowCol
    Type
    boolean

    isVisible

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

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

    Inherited From
    RowCol
    Type
    boolean

    mask

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

    The format used to define the mask 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'.

    The default value for this property is **null**, which means any character is accepted at any position.

    Inherited From
    RowCol
    Type
    string

    maxLength

    Gets or sets the maximum number of characters that the can be entered into cells in this column or row.

    The default value for this property is **null**, which allows entries with any number of characters.

    Inherited From
    RowCol
    Type
    number

    maxSize

    Gets or sets the maximum size of elements in the collection.

    Type
    number

    minSize

    Gets or sets the minimum size of elements in the collection.

    Type
    number

    multiLine

    Gets or sets a value that indicates whether the content of cells in this column or row should wrap at new line characters (\n).

    The default value for this property is **false**.

    Inherited From
    RowCol
    Type
    boolean

    pos

    Gets the position of the column or row in pixels.

    Inherited From
    RowCol
    Type
    number

    renderSize

    Gets the render size of the column or row.

    This property accounts for visibility, default size, and min and max sizes.

    Inherited From
    RowCol
    Type
    number

    size

    Gets or sets the size of the column or row.

    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.

    The default value for this property is **null**, which causes the grid to use the value of the binding property to sort the column.

    Inherited From
    RowCol
    Type
    string

    visible

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

    The default value for this property is **true**.

    Inherited From
    RowCol
    Type
    boolean

    visibleIndex

    Gets the index of the column or row in the parent collection ignoring invisible elements (isVisible).

    Inherited From
    RowCol
    Type
    number

    visibleLength

    Gets the number of visible elements in the collection (isVisible).

    Type
    number

    wordWrap

    Gets or sets a value that indicates whether the content of cells in this column or row should wrap to fit the available column width.

    The default value for this property is **false**.

    Inherited From
    RowCol
    Type
    boolean

    Methods

    beginUpdate

    beginUpdate(): void
    

    Suspends notifications until the next call to endUpdate.

    Returns
    void

    canMoveElement

    canMoveElement(src: number, dst: number, adjustFrozenCount?: boolean): boolean
    

    Checks whether an element can be moved from one position to another.

    Parameters
    • src: number

      The index of the element to move.

    • dst: number

      The position to which to move the element, or specify -1 to append the element.

    • adjustFrozenCount: boolean Optional

      Whether to adjust the frozen element count when the movement is into or out of the frozen area.

    Returns
    boolean

    getItemAt

    getItemAt(position: number): number
    

    Gets the index of the element at a given physical position.

    Parameters
    • position: number

      Position of the item in the collection, in pixels.

    Returns
    number

    getNextCell

    getNextCell(index: number, move: SelMove, pageSize?: number): void
    

    Finds the next visible cell for a selection change.

    Parameters
    • index: number

      Starting index for the search.

    • move: SelMove

      Type of move (size and direction).

    • pageSize: number Optional

      Size of a page (in case the move is a page up/down).

    Returns
    void

    getTotalSize

    getTotalSize(): number
    

    Gets the total size of the elements in the collection.

    Returns
    number

    isFrozen

    isFrozen(index: number): boolean
    

    Checks whether a column or row is frozen.

    Parameters
    • index: number

      The index of the column or row to check.

    Returns
    boolean

    moveElement

    moveElement(src: number, dst: number, adjustFrozenCount?: boolean): boolean
    

    Moves an element from one position to another.

    Parameters
    • src: number

      Index of the element to move.

    • dst: number

      Position where the element should be moved to (-1 to append).

    • adjustFrozenCount: boolean Optional

      Whether to adjust the frozen element count when the movement is into or out of the frozen area.

    Returns
    boolean

    onCollectionChanged

    onCollectionChanged(e?: NotifyCollectionChangedEventArgs): void
    

    Keeps track of dirty state and invalidate grid on changes.

    Parameters
    Returns
    void

    onGridChanged

    onGridChanged(e?: EventArgs): void
    

    Raises the gridChanged event.

    Parameters
    Inherited From
    RowCol
    Returns
    void

    onPropertyChanged

    onPropertyChanged(): void
    

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

    Inherited From
    RowCol
    Returns
    void

    push

    push(item: T): number
    

    Appends an item to the array.

    Parameters
    • item: T

      Item to add to the array.

    Returns
    number

    splice

    splice(index: number, count: number, ...item: T[]): T[]
    

    Removes or adds items to the array.

    Parameters
    • index: number

      Position where items are to be added or removed.

    • count: number

      Number of items to remove from the array.

    • ...item: T[]

      One or mode items to add to the array.

    Returns
    T[]

    Events

    gridChanged

    Occurs when the value of the grid property changes.

    Inherited From
    RowCol
    Arguments
    EventArgs