WjPivotGrid Class

File
wijmo.angular2.js
Module
wijmo/wijmo.angular2.olap
Base Class
PivotGrid
Show
   

Angular 2 component for the PivotGrid control.

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

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

Constructor

Properties

Methods

Events

Constructor

constructor

constructor(element: any, options?): PivotGrid

Initializes a new instance of the PivotGrid class.

Parameters
Inherited From
PivotGrid
Returns
PivotGrid

Properties

activeEditor

Gets the HTMLInputElement that represents the cell editor currently active.

Inherited From
FlexGrid
Type
HTMLInputElement

allowAddNew

Gets or sets a value that indicates whether the grid should provide a new row template so users can add items to the source collection.

The new row template will not be displayed if the isReadOnly property is set to true.

Inherited From
FlexGrid
Type
boolean

allowDelete

Gets or sets a value that indicates whether the grid should delete selected rows when the user presses the Delete key.

Selected rows will not be deleted if the isReadOnly property is set to true.

Inherited From
FlexGrid
Type
boolean

allowDragging

Gets or sets a value that determines whether users are allowed to drag rows and/or columns with the mouse.

Inherited From
FlexGrid
Type
AllowDragging

allowMerging

Gets or sets which parts of the grid provide cell merging.

Inherited From
FlexGrid
Type
AllowMerging

allowResizing

Gets or sets a value that determines whether users may resize rows and/or columns with the mouse.

If resizing is enabled, users can resize columns by dragging the right edge of column header cells, or rows by dragging the bottom edge of row header cells.

Users may also double-click the edge of the header cells to automatically resize rows and columns to fit their content. The auto-size behavior can be customized using the autoSizeMode property.

Inherited From
FlexGrid
Type
AllowResizing

allowSorting

Gets or sets a value that determines whether users are allowed to sort columns by clicking the column header cells.

Inherited From
FlexGrid
Type
boolean

autoClipboard

Gets or sets a value that determines whether the grid should handle clipboard shortcuts.

The clipboard shortcuts are as follows:

ctrl+C, ctrl+Ins
Copy grid selection to clipboard.
ctrl+V, shift+Ins
Paste clipboard text to grid selection.

Only visible rows and columns are included in clipboard operations.

Read-only cells are not affected by paste operations.

Inherited From
FlexGrid
Type
boolean

autoGenerateColumns

Gets or sets a value that determines whether the grid should generate columns automatically based on the itemsSource.

The column generation depends on the itemsSource property containing at least one item. This data item is inspected and a column is created and bound to each property that contains a primitive value (number, string, Boolean, or Date).

Properties set to null do not generate columns, because the grid would have no way of guessing the appropriate type. In this type of scenario, you should set the autoGenerateColumns property to false and create the columns explicitly. For example:

var grid = new wijmo.grid.FlexGrid('#theGrid', {
  autoGenerateColumns: false, // data items may contain null values
  columns: [                  // so define columns explicitly
    { binding: 'name', header: 'Name', type: 'String' },
    { binding: 'amount', header: 'Amount', type: 'Number' },
    { binding: 'date', header: 'Date', type: 'Date' },
    { binding: 'active', header: 'Active', type: 'Boolean' }
  ],
  itemsSource: customers
});
Inherited From
FlexGrid
Type
boolean

autoSizedColumnNg

Angular (EventEmitter) version of the Wijmo autoSizedColumn event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional autoSizedColumn Wijmo event name.

Type
EventEmitter

autoSizedRowNg

Angular (EventEmitter) version of the Wijmo autoSizedRow event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional autoSizedRow Wijmo event name.

Type
EventEmitter

autoSizeMode

Gets or sets which cells should be taken into account when auto-sizing a row or column.

This property controls what happens when users double-click the edge of a column header.

By default, the grid will automatically set the column width based on the content of the header and data cells in the column. This property allows you to change that to include only the headers or only the data.

Inherited From
FlexGrid
Type
AutoSizeMode

autoSizingColumnNg

Angular (EventEmitter) version of the Wijmo autoSizingColumn event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional autoSizingColumn Wijmo event name.

Type
EventEmitter

autoSizingRowNg

Angular (EventEmitter) version of the Wijmo autoSizingRow event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional autoSizingRow Wijmo event name.

Type
EventEmitter

beginningEditNg

Angular (EventEmitter) version of the Wijmo beginningEdit event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional beginningEdit Wijmo event name.

Type
EventEmitter

bottomLeftCells

Gets the GridPanel that contains the bottom left cells.

The bottomLeftCells panel appears below the row headers, to the left of the columnFooters panel.

Inherited From
FlexGrid
Type
GridPanel

cellEditEndedNg

Angular (EventEmitter) version of the Wijmo cellEditEnded event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional cellEditEnded Wijmo event name.

Type
EventEmitter

cellEditEndingNg

Angular (EventEmitter) version of the Wijmo cellEditEnding event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional cellEditEnding Wijmo event name.

Type
EventEmitter

cellFactory

Gets or sets the CellFactory that creates and updates cells for this grid.

Inherited From
FlexGrid
Type
CellFactory

cells

Gets the GridPanel that contains the data cells.

Inherited From
FlexGrid
Type
GridPanel

centerHeadersVertically

Gets or sets a value that determines whether the content of header cells should be vertically centered.

Inherited From
PivotGrid
Type
boolean

childItemsPath

Gets or sets the name of the property (or properties) used to generate child rows in hierarchical grids.

Set this property to a string to specify the name of the property that contains an item's child items (e.g. 'items').

If items at different levels child items with different names, then set this property to an array containing the names of the properties that contain child items et each level (e.g. [ 'accounts', 'checks', 'earnings' ]).

Inherited From
FlexGrid
Type
any

clientSize

Gets the client size of the control (control size minus headers and scrollbars).

Inherited From
FlexGrid
Type
Size

collapsibleSubtotals

Gets or sets a value that determines whether the grid should allow users to collapse and expand subtotal groups of rows and columns.

Inherited From
PivotGrid
Type
boolean

collectionView

Gets the ICollectionView that contains the grid data.

Inherited From
FlexGrid
Type
ICollectionView

columnFooters

Gets the GridPanel that contains the column footer cells.

The columnFooters panel appears below the grid cells, to the right of the bottomLeftCells panel. It can be used to display summary information below the grid data.

The example below shows how you can add a row to the columnFooters panel to display summary data for columns that have the aggregate property set:

function addFooterRow(flex) {

  // create a GroupRow to show aggregates
  var row = new wijmo.grid.GroupRow();

  // add the row to the column footer panel
  flex.columnFooters.rows.push(row);

  // show a sigma on the header
  flex.bottomLeftCells.setCellData(0, 0, '\u03A3');
}
Inherited From
FlexGrid
Type
GridPanel

columnHeaders

Gets the GridPanel that contains the column header cells.

Inherited From
FlexGrid
Type
GridPanel

columnLayout

Gets or sets a JSON string that defines the current column layout.

The column layout string represents an array with the columns and their properties. It can be used to persist column layouts defined by users so they are preserved across sessions, and can also be used to implement undo/redo functionality in applications that allow users to modify the column layout.

The column layout string does not include dataMap properties, because data maps are not serializable.

Inherited From
FlexGrid
Type
string

columns

Gets the grid's column collection.

Inherited From
FlexGrid
Type
ColumnCollection

controlRect

Gets the bounding rectangle of the control in page coordinates.

Inherited From
FlexGrid
Type
Rect

copiedNg

Angular (EventEmitter) version of the Wijmo copied event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional copied Wijmo event name.

Type
EventEmitter

copyingNg

Angular (EventEmitter) version of the Wijmo copying event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional copying Wijmo event name.

Type
EventEmitter

customContextMenu

Gets or sets a value that determines whether the grid should provide a custom context menu.

The custom context menu includes commands for changing field settings, removing fields, or showing detail records for the grid cells.

Inherited From
PivotGrid
Type
boolean

deferResizing

Gets or sets a value that determines whether row and column resizing should be deferred until the user releases the mouse button.

By default, deferResizing is set to false, causing rows and columns to be resized as the user drags the mouse. Setting this property to true causes the grid to show a resizing marker and to resize the row or column only when the user releases the mouse button.

Inherited From
FlexGrid
Type
boolean

deletingRowNg

Angular (EventEmitter) version of the Wijmo deletingRow event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional deletingRow Wijmo event name.

Type
EventEmitter

draggedColumnNg

Angular (EventEmitter) version of the Wijmo draggedColumn event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional draggedColumn Wijmo event name.

Type
EventEmitter

draggedRowNg

Angular (EventEmitter) version of the Wijmo draggedRow event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional draggedRow Wijmo event name.

Type
EventEmitter

draggingColumnNg

Angular (EventEmitter) version of the Wijmo draggingColumn event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional draggingColumn Wijmo event name.

Type
EventEmitter

draggingColumnOverNg

Angular (EventEmitter) version of the Wijmo draggingColumnOver event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional draggingColumnOver Wijmo event name.

Type
EventEmitter

draggingRowNg

Angular (EventEmitter) version of the Wijmo draggingRow event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional draggingRow Wijmo event name.

Type
EventEmitter

draggingRowOverNg

Angular (EventEmitter) version of the Wijmo draggingRowOver event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional draggingRowOver Wijmo event name.

Type
EventEmitter

editRange

Gets a CellRange that identifies the cell currently being edited.

Inherited From
FlexGrid
Type
CellRange

engine

Gets a reference to the PivotEngine that owns this PivotGrid.

Inherited From
PivotGrid
Type
PivotEngine

formatItemNg

Angular (EventEmitter) version of the Wijmo formatItem event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional formatItem Wijmo event name.

Type
EventEmitter

frozenColumns

Gets or sets the number of frozen columns.

Frozen columns do not scroll horizontally, but the cells they contain may be selected and edited.

Inherited From
FlexGrid
Type
number

frozenRows

Gets or sets the number of frozen rows.

Frozen rows do not scroll vertically, but the cells they contain may be selected and edited.

Inherited From
FlexGrid
Type
number

gotFocusNg

Angular (EventEmitter) version of the Wijmo gotFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional gotFocus Wijmo event name.

Type
EventEmitter

groupCollapsedChangedNg

Angular (EventEmitter) version of the Wijmo groupCollapsedChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional groupCollapsedChanged Wijmo event name.

Type
EventEmitter

groupCollapsedChangingNg

Angular (EventEmitter) version of the Wijmo groupCollapsedChanging event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional groupCollapsedChanging Wijmo event name.

Type
EventEmitter

groupHeaderFormat

Gets or sets the format string used to create the group header content.

The string may contain any text, plus the following replacement strings:

  • {name}: The name of the property being grouped on.
  • {value}: The value of the property being grouped on.
  • {level}: The group level.
  • {count}: The total number of items in this group.

If a column is bound to the grouping property, the column header is used to replace the {name} parameter, and the column's format and data maps are used to calculate the {value} parameter. If no column is available, the group information is used instead.

You may add invisible columns bound to the group properties in order to customize the formatting of the group header cells.

The default value for this property is
'{name}: <b>{value}</b>({count:n0} items)', which creates group headers similar to
'Country: UK (12 items)' or
'Country: Japan (8 items)'.

Inherited From
FlexGrid
Type
string

headersVisibility

Gets or sets a value that determines whether the row and column headers are visible.

Inherited From
FlexGrid
Type
HeadersVisibility

hostElement

Gets the DOM element that is hosting the control.

Inherited From
Control
Type
HTMLElement

imeEnabled

Gets or sets a value that determines whether the grid should support Input Method Editors (IME) while not in edit mode.

This property is relevant only for sites/applications in Japanese, Chinese, Korean, and other languages that require IME support.

Inherited From
FlexGrid
Type
boolean

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

isDisabled

Gets or sets a value that determines whether the control is disabled.

Disabled controls cannot get mouse or keyboard events.

Inherited From
Control
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 determines whether the user can modify cell values using the mouse and keyboard.

Inherited From
FlexGrid
Type
boolean

isTouching

Gets a value that indicates whether the control is currently handling a touch event.

Inherited From
Control
Type
boolean

isUpdating

Gets a value that indicates whether the control is currently being updated.

Inherited From
Control
Type
boolean

itemFormatter

Gets or sets a formatter function used to customize cells on this grid.

The formatter function can add any content to any cell. It provides complete flexibility over the appearance and behavior of grid cells.

If specified, the function should take four parameters: the GridPanel that contains the cell, the row and column indices of the cell, and the HTML element that represents the cell. The function will typically change the innerHTML property of the cell element.

For example:

flex.itemFormatter = function(panel, r, c, cell) {
  if (panel.cellType == CellType.Cell) {

    // draw sparklines in the cell
    var col = panel.columns[c];
    if (col.name == 'sparklines') {
      cell.innerHTML = getSparklike(panel, r, c);
    }
  }
}

Note that the FlexGrid recycles cells, so if your itemFormatter modifies the cell's style attributes, you must make sure that it resets these attributes for cells that should not have them. For example:

flex.itemFormatter = function(panel, r, c, cell) {

  // reset attributes we are about to customize
  var s = cell.style;
  s.color = '';
  s.backgroundColor = '';

  // customize color and backgroundColor attributes for this cell
  ...
}

If you have a scenario where multiple clients may want to customize the grid rendering (for example when creating directives or re-usable libraries), consider using the formatItem event instead. The event allows multiple clients to attach their own handlers.

Inherited From
FlexGrid
Type
Function

itemsSource

Gets or sets the array or ICollectionView that contains items shown on the grid.

Inherited From
FlexGrid
Type
any

itemsSourceChangedNg

Angular (EventEmitter) version of the Wijmo itemsSourceChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional itemsSourceChanged Wijmo event name.

Type
EventEmitter

loadedRowsNg

Angular (EventEmitter) version of the Wijmo loadedRows event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional loadedRows Wijmo event name.

Type
EventEmitter

loadingRowsNg

Angular (EventEmitter) version of the Wijmo loadingRows event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional loadingRows Wijmo event name.

Type
EventEmitter

lostFocusNg

Angular (EventEmitter) version of the Wijmo lostFocus event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional lostFocus Wijmo event name.

Type
EventEmitter

mergeManager

Gets or sets the MergeManager object responsible for determining how cells should be merged.

Inherited From
FlexGrid
Type
MergeManager

newRowAtTop

Gets or sets a value that indicates whether the new row template should be located at the top of the grid or at the bottom.

If you set the newRowAtTop property to true, and you want the new row template to remain visible at all times, set the frozenRows property to one. This will freeze the new row template at the top so it won't scroll off the view.

The new row template will be displayed only if the allowAddNew property is set to true and if the itemsSource object supports adding new items.

Inherited From
FlexGrid
Type
boolean

pastedCellNg

Angular (EventEmitter) version of the Wijmo pastedCell event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional pastedCell Wijmo event name.

Type
EventEmitter

pastedNg

Angular (EventEmitter) version of the Wijmo pasted event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional pasted Wijmo event name.

Type
EventEmitter

pastingCellNg

Angular (EventEmitter) version of the Wijmo pastingCell event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional pastingCell Wijmo event name.

Type
EventEmitter

pastingNg

Angular (EventEmitter) version of the Wijmo pasting event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional pasting Wijmo event name.

Type
EventEmitter

prepareCellForEditNg

Angular (EventEmitter) version of the Wijmo prepareCellForEdit event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional prepareCellForEdit Wijmo event name.

Type
EventEmitter

preserveOutlineState

Gets or sets a value that determines whether the grid should preserve the expanded/collapsed state of nodes when the data is refreshed.

The preserveOutlineState property implementation is based on JavaScript's Map object, which is not available in IE 9 or 10.

Inherited From
FlexGrid
Type
boolean

preserveSelectedState

Gets or sets a value that determines whether the grid should preserve the selected state of rows when the data is refreshed.

Inherited From
FlexGrid
Type
boolean

resizedColumnNg

Angular (EventEmitter) version of the Wijmo resizedColumn event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional resizedColumn Wijmo event name.

Type
EventEmitter

resizedRowNg

Angular (EventEmitter) version of the Wijmo resizedRow event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional resizedRow Wijmo event name.

Type
EventEmitter

resizingColumnNg

Angular (EventEmitter) version of the Wijmo resizingColumn event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional resizingColumn Wijmo event name.

Type
EventEmitter

resizingRowNg

Angular (EventEmitter) version of the Wijmo resizingRow event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional resizingRow Wijmo event name.

Type
EventEmitter

rightToLeft

Gets a value indicating whether the control is hosted in an element with right-to-left layout.

Inherited From
Control
Type
boolean

rowAddedNg

Angular (EventEmitter) version of the Wijmo rowAdded event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rowAdded Wijmo event name.

Type
EventEmitter

rowEditEndedNg

Angular (EventEmitter) version of the Wijmo rowEditEnded event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rowEditEnded Wijmo event name.

Type
EventEmitter

rowEditEndingNg

Angular (EventEmitter) version of the Wijmo rowEditEnding event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rowEditEnding Wijmo event name.

Type
EventEmitter

rowEditStartedNg

Angular (EventEmitter) version of the Wijmo rowEditStarted event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rowEditStarted Wijmo event name.

Type
EventEmitter

rowEditStartingNg

Angular (EventEmitter) version of the Wijmo rowEditStarting event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional rowEditStarting Wijmo event name.

Type
EventEmitter

rowHeaders

Gets the GridPanel that contains the row header cells.

Inherited From
FlexGrid
Type
GridPanel

rows

Gets the grid's row collection.

Inherited From
FlexGrid
Type
RowCollection

scrollPosition

Gets or sets a Point that represents the value of the grid's scrollbars.

Inherited From
FlexGrid
Type
Point

scrollPositionChangedNg

Angular (EventEmitter) version of the Wijmo scrollPositionChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional scrollPositionChanged Wijmo event name.

Type
EventEmitter

scrollSize

Gets the size of the grid content in pixels.

Inherited From
FlexGrid
Type
Size

selectedItems

Gets or sets an array containing the data items that are currently selected.

Note: this property can be read in all selection modes, but it can be set only when selectionMode is set to SelectionMode.ListBox.

Inherited From
FlexGrid
Type
any[]

selectedRows

Gets or sets an array containing the rows that are currently selected.

Note: this property can be read in all selection modes, but it can be set only when selectionMode is set to SelectionMode.ListBox.

Inherited From
FlexGrid
Type
any[]

selection

Gets or sets the current selection.

Inherited From
FlexGrid
Type
CellRange

selectionChangedNg

Angular (EventEmitter) version of the Wijmo selectionChanged event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional selectionChanged Wijmo event name.

Type
EventEmitter

selectionChangingNg

Angular (EventEmitter) version of the Wijmo selectionChanging event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional selectionChanging Wijmo event name.

Type
EventEmitter

selectionMode

Gets or sets the current selection mode.

Inherited From
FlexGrid
Type
SelectionMode

showAlternatingRows

Gets or sets a value that determines whether the grid should add the 'wj-alt' class to cells in alternating rows.

Setting this property to false disables alternate row styles without any changes to the CSS.

Inherited From
FlexGrid
Type
boolean

showDetailOnDoubleClick

Gets or sets a value that determines whether the grid should show a popup containing the detail records when the user double-clicks a cell.

Inherited From
PivotGrid
Type
boolean

showErrors

Gets or sets a value that determines whether the grid should add the 'wj-state-invalid' class to cells that contain validation errors, and tooltips with error descriptions.

The grid detects validation errors using the getError property on the grid's itemsSource.

Inherited From
FlexGrid
Type
boolean

showGroups

Gets or sets a value that determines whether the grid should insert group rows to delimit data groups.

Data groups are created by modifying the groupDescriptions property of the ICollectionView object used as a the grid's itemsSource.

Inherited From
FlexGrid
Type
boolean

showMarquee

Gets or sets a value that indicates whether the grid should display a marquee element around the current selection.

Inherited From
FlexGrid
Type
boolean

showRowFieldSort

Gets or sets a value that determines whether the grid should display sort indicators in the column headers for row fields.

Unlike regular column headers, row fields are always sorted, either in ascending or descending order. If you set this property to true, sort icons will always be displayed over any row field headers.

Inherited From
PivotGrid
Type
boolean

showSelectedHeaders

Gets or sets a value that indicates whether the grid should add class names to indicate selected header cells.

Inherited From
FlexGrid
Type
HeadersVisibility

showSort

Gets or sets a value that determines whether the grid should display sort indicators in the column headers.

Sorting is controlled by the sortDescriptions property of the ICollectionView object used as a the grid's itemsSource.

Inherited From
FlexGrid
Type
boolean

sortedColumnNg

Angular (EventEmitter) version of the Wijmo sortedColumn event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional sortedColumn Wijmo event name.

Type
EventEmitter

sortingColumnNg

Angular (EventEmitter) version of the Wijmo sortingColumn event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional sortingColumn Wijmo event name.

Type
EventEmitter

sortRowIndex

Gets or sets the index of row in the column header panel that shows and changes the current sort.

This property is set to null by default, causing the last row in the columnHeaders panel to act as the sort row.

Inherited From
FlexGrid
Type
number

stickyHeaders

Gets or sets a value that determines whether column headers should remain visible when the user scrolls the document.

Inherited From
FlexGrid
Type
boolean

topLeftCells

Gets the GridPanel that contains the top left cells (to the left of the column headers).

Inherited From
FlexGrid
Type
GridPanel

treeIndent

Gets or sets the indent used to offset row groups of different levels.

Inherited From
FlexGrid
Type
number

updatedLayoutNg

Angular (EventEmitter) version of the Wijmo updatedLayout event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional updatedLayout Wijmo event name.

Type
EventEmitter

updatedViewNg

Angular (EventEmitter) version of the Wijmo updatedView event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional updatedView Wijmo event name.

Type
EventEmitter

updatingLayoutNg

Angular (EventEmitter) version of the Wijmo updatingLayout event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional updatingLayout Wijmo event name.

Type
EventEmitter

updatingViewNg

Angular (EventEmitter) version of the Wijmo updatingView event for programmatic access. Use this event name if you want to subscribe to the Angular version of the event in code. In template bindings use the conventional updatingView Wijmo event name.

Type
EventEmitter

validateEdits

Gets or sets a value that determines whether the grid should remain in edit mode when the user tries to commit edits that fail validation.

The grid detects validation errors by calling the getError method on the grid's itemsSource.

Inherited From
FlexGrid
Type
boolean

viewRange

Gets the range of cells currently in view.

Inherited From
FlexGrid
Type
CellRange

wjModelProperty

Defines a name of a property represented by [(ngModel)] directive (if specified). Default value is ''.

Type
string

Methods

addEventListener

addEventListener(target: EventTarget, type: string, fn: any, capture?: boolean): void

Adds an event listener to an element owned by this Control.

The control keeps a list of attached listeners and their handlers, making it easier to remove them when the control is disposed (see the dispose and removeEventListener method).

Failing to remove event listeners may cause memory leaks.

Parameters
Inherited From
Control
Returns
void

applyTemplate

applyTemplate(classNames: string, template: string, parts: Object, namePart?: string): HTMLElement

Applies the template to a new instance of a control, and returns the root element.

This method should be called by constructors of templated controls. It is responsible for binding the template parts to the corresponding control members.

For example, the code below applies a template to an instance of an InputNumber control. The template must contain elements with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'. The control members '_tbx', '_btnUp', and '_btnDn' will be assigned references to these elements.

this.applyTemplate('wj-control wj-inputnumber', template, {
  _tbx: 'input',
  _btnUp: 'btn-inc',
  _btnDn: 'btn-dec'
}, 'input');
Parameters
Inherited From
Control
Returns
HTMLElement

autoSizeColumn

autoSizeColumn(c: number, header?: boolean, extra?: number): void

Resizes a column to fit its content.

Parameters
Inherited From
FlexGrid
Returns
void

autoSizeColumns

autoSizeColumns(firstColumn?: number, lastColumn?: number, header?: boolean, extra?: number): void

Resizes a range of columns to fit their content.

The grid will always measure all rows in the current view range, plus up to 2,000 rows not currently in view. If the grid contains a large amount of data (say 50,000 rows), then not all rows will be measured since that could potentially take a long time.

Parameters
Inherited From
FlexGrid
Returns
void

autoSizeRow

autoSizeRow(r: number, header?: boolean, extra?: number): void

Resizes a row to fit its content.

Parameters
Inherited From
FlexGrid
Returns
void

autoSizeRows

autoSizeRows(firstRow?: number, lastRow?: number, header?: boolean, extra?: number): void

Resizes a range of rows to fit their content.

Parameters
Inherited From
FlexGrid
Returns
void

beginUpdate

beginUpdate(): void

Suspends notifications until the next call to endUpdate.

Inherited From
Control
Returns
void

canEditCell

canEditCell(r: number, c: number): void

Gets a value that indicates whether a given cell can be edited.

Parameters
Inherited From
FlexGrid
Returns
void

collapseColumnsToLevel

collapseColumnsToLevel(level: number): void

Collapses all columns to a given level.

Parameters
Inherited From
PivotGrid
Returns
void

collapseGroupsToLevel

collapseGroupsToLevel(level: number): void

Collapses all the group rows to a given level.

Parameters
Inherited From
FlexGrid
Returns
void

collapseRowsToLevel

collapseRowsToLevel(level: number): void

Collapses all rows to a given level.

Parameters
Inherited From
PivotGrid
Returns
void

containsFocus

containsFocus(): boolean

Checks whether this control contains the focused element.

Inherited From
FlexGrid
Returns
boolean

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

deferUpdate

deferUpdate(fn: Function): void

Executes a function within a beginUpdate/endUpdate block.

The control will not be updated until the function has been executed. This method ensures endUpdate is called even if the function throws an exception.

Parameters
Inherited From
Control
Returns
void

dispose

dispose(): void

Disposes of the control by removing its association with the host element.

Inherited From
FlexGrid
Returns
void

Static disposeAll

disposeAll(e?: HTMLElement): void

Disposes of all Wijmo controls contained in an HTML element.

Parameters
Inherited From
Control
Returns
void

endUpdate

endUpdate(): void

Resumes notifications suspended by calls to beginUpdate.

Inherited From
Control
Returns
void

finishEditing

finishEditing(cancel?: boolean): boolean

Commits any pending edits and exits edit mode.

Parameters
Inherited From
FlexGrid
Returns
boolean

focus

focus(): void

Overridden to set the focus to the grid without scrolling the whole grid into view.

Inherited From
FlexGrid
Returns
void

getCellBoundingRect

getCellBoundingRect(r: number, c: number, raw?: boolean): Rect

Gets a the bounds of a cell element in viewport coordinates.

This method returns the bounds of cells in the cells panel (scrollable data cells). To get the bounds of cells in other panels, use the getCellBoundingRect method in the appropriate GridPanel object.

The returned value is a Rect object which contains the position and dimensions of the cell in viewport coordinates. The viewport coordinates are the same used by the getBoundingClientRect method.

Parameters
Inherited From
FlexGrid
Returns
Rect

getCellData

getCellData(r: number, c: number, formatted: boolean): any

Gets the value stored in a cell in the scrollable area of the grid.

Parameters
Inherited From
FlexGrid
Returns
any

getClipString

getClipString(rng?: CellRange): string

Gets the content of a CellRange as a string suitable for copying to the clipboard.

Hidden rows and columns are not included in the clip string.

Parameters
Inherited From
FlexGrid
Returns
string

getColumn

getColumn(name: string): Column

Gets a column by name or by binding.

The method searches the column by name. If a column with the given name is not found, it searches by binding. The searches are case-sensitive.

Parameters
Inherited From
FlexGrid
Returns
Column

Static getControl

getControl(element: any): Control

Gets the control that is hosted in a given DOM element.

Parameters
Inherited From
Control
Returns
Control

getDetail

getDetail(row: number, col: number): any[]

Gets an array containing the records summarized by a given grid cell.

Parameters
Inherited From
PivotGrid
Returns
any[]

getDetailView

getDetailView(row: number, col: number): ICollectionView

Gets an ICollectionView containing the records summarized by a given grid cell.

Parameters
Inherited From
PivotGrid
Returns
ICollectionView

getKeys

getKeys(row: number, col: number): any

Gets an object with information about the fields and values being used to summarize a given cell.

For more details, see the @PivotEngine.getKeys method.

Parameters
Inherited From
PivotGrid
Returns
any

getMergedRange

getMergedRange(p: GridPanel, r: number, c: number, clip?: boolean): CellRange

Gets a CellRange that specifies the merged extent of a cell in a GridPanel.

Parameters
Inherited From
FlexGrid
Returns
CellRange

getSelectedState

getSelectedState(r: number, c: number): SelectedState

Gets a SelectedState value that indicates the selected state of a cell.

Parameters
Inherited From
FlexGrid
Returns
SelectedState

getTemplate

getTemplate(): string

Gets the HTML template used to create instances of the control.

This method traverses up the class hierarchy to find the nearest ancestor that specifies a control template. For example, if you specify a prototype for the ComboBox control, it will override the template defined by the DropDown base class.

Inherited From
Control
Returns
string

hitTest

hitTest(pt: any, y?: number): HitTestInfo

Gets a HitTestInfo object with information about a given point.

For example:

// hit test a point when the user clicks on the grid
flex.hostElement.addEventListener('click', function (e) {
  var ht = flex.hitTest(e.pageX, e.pageY);
  console.log('you clicked a cell of type "' +
    wijmo.grid.CellType[ht.cellType] + '".');
});
Parameters
Inherited From
FlexGrid
Returns
HitTestInfo

initialize

initialize(options: any): void

Initializes the control by copying the properties from a given object.

This method allows you to initialize controls using plain data objects instead of setting the value of each property in code.

For example:

grid.initialize({
  itemsSource: myList,
  autoGenerateColumns: false,
  columns: [
    { binding: 'id', header: 'Code', width: 130 },
    { binding: 'name', header: 'Name', width: 60 } 
  ]
});

// is equivalent to
grid.itemsSource = myList;
grid.autoGenerateColumns = false;

// etc.

The initialization data is type-checked as it is applied. If the initialization object contains unknown property names or invalid data types, this method will throw.

Parameters
Inherited From
Control
Returns
void

invalidate

invalidate(fullUpdate?: boolean): void

Invalidates the control causing an asynchronous refresh.

Parameters
Inherited From
Control
Returns
void

Static invalidateAll

invalidateAll(e?: HTMLElement): void

Invalidates all Wijmo controls contained in an HTML element.

Use this method when your application has dynamic panels that change the control's visibility or dimensions. For example, splitters, accordions, and tab controls usually change the visibility of its content elements. In this case, failing to notify the controls contained in the element may cause them to stop working properly.

If this happens, you must handle the appropriate event in the dynamic container and call the invalidateAll method so the contained Wijmo controls will update their layout information properly.

Parameters
Inherited From
Control
Returns
void

isRangeValid

isRangeValid(rng: CellRange): boolean

Checks whether a given CellRange is valid for this grid's row and column collections.

Parameters
Inherited From
FlexGrid
Returns
boolean

onAutoSizedColumn

onAutoSizedColumn(e: CellRangeEventArgs): void

Raises the autoSizedColumn event.

Parameters
Inherited From
FlexGrid
Returns
void

onAutoSizedRow

onAutoSizedRow(e: CellRangeEventArgs): void

Raises the autoSizedRow event.

Parameters
Inherited From
FlexGrid
Returns
void

onAutoSizingColumn

onAutoSizingColumn(e: CellRangeEventArgs): boolean

Raises the autoSizingColumn event.

Parameters
Inherited From
FlexGrid
Returns
boolean

onAutoSizingRow

onAutoSizingRow(e: CellRangeEventArgs): boolean

Raises the autoSizingRow event.

Parameters
Inherited From
FlexGrid
Returns
boolean

onBeginningEdit

onBeginningEdit(e: CellRangeEventArgs): boolean

Raises the beginningEdit event.

Parameters
Inherited From
FlexGrid
Returns
boolean

onCellEditEnded

onCellEditEnded(e: CellRangeEventArgs): void

Raises the cellEditEnded event.

Parameters
Inherited From
FlexGrid
Returns
void

onCellEditEnding

onCellEditEnding(e: CellEditEndingEventArgs): boolean

Raises the cellEditEnding event.

Parameters
Inherited From
FlexGrid
Returns
boolean

onCopied

onCopied(e: CellRangeEventArgs): void

Raises the copied event.

Parameters
Inherited From
FlexGrid
Returns
void

onCopying

onCopying(e: CellRangeEventArgs): boolean

Raises the copying event.

Parameters
Inherited From
FlexGrid
Returns
boolean

onDeletedRow

onDeletedRow(e: CellRangeEventArgs): void

Raises the deletedRow event.

Parameters
Inherited From
FlexGrid
Returns
void

onDeletingRow

onDeletingRow(e: CellRangeEventArgs): boolean

Raises the deletingRow event.

Parameters
Inherited From
FlexGrid
Returns
boolean

onDraggedColumn

onDraggedColumn(e: CellRangeEventArgs): void

Raises the draggedColumn event.

Parameters
Inherited From
FlexGrid
Returns
void

onDraggedRow

onDraggedRow(e: CellRangeEventArgs): void

Raises the draggedRow event.

Parameters
Inherited From
FlexGrid
Returns
void

onDraggingColumn

onDraggingColumn(e: CellRangeEventArgs): boolean

Raises the draggingColumn event.

Parameters
Inherited From
FlexGrid
Returns
boolean

onDraggingColumnOver

onDraggingColumnOver(e: CellRangeEventArgs): boolean

Raises the draggingColumnOver event.

Parameters
Inherited From
FlexGrid
Returns
boolean

onDraggingRow

onDraggingRow(e: CellRangeEventArgs): boolean

Raises the draggingRow event.

Parameters
Inherited From
FlexGrid
Returns
boolean

onDraggingRowOver

onDraggingRowOver(e: CellRangeEventArgs): boolean

Raises the draggingRowOver event.

Parameters
Inherited From
FlexGrid
Returns
boolean

onFormatItem

onFormatItem(e: FormatItemEventArgs): void

Raises the formatItem event.

Parameters
Inherited From
FlexGrid
Returns
void

onGotFocus

onGotFocus(e?: EventArgs): void

Raises the gotFocus event.

Parameters
Inherited From
Control
Returns
void

onGroupCollapsedChanged

onGroupCollapsedChanged(e: CellRangeEventArgs): void

Raises the groupCollapsedChanged event.

Parameters
Inherited From
FlexGrid
Returns
void

onGroupCollapsedChanging

onGroupCollapsedChanging(e: CellRangeEventArgs): boolean

Raises the groupCollapsedChanging event.

Parameters
Inherited From
FlexGrid
Returns
boolean

onItemsSourceChanged

onItemsSourceChanged(e?: EventArgs): void

Raises the itemsSourceChanged event.

Parameters
Inherited From
FlexGrid
Returns
void

onLoadedRows

onLoadedRows(e?: EventArgs): void

Raises the loadedRows event.

Parameters
Inherited From
FlexGrid
Returns
void

onLoadingRows

onLoadingRows(e: CancelEventArgs): boolean

Raises the loadingRows event.

Parameters
Inherited From
FlexGrid
Returns
boolean

onLostFocus

onLostFocus(e?: EventArgs): void

Raises the lostFocus event.

Parameters
Inherited From
Control
Returns
void

onPasted

onPasted(e: CellRangeEventArgs): void

Raises the pasted event.

Parameters
Inherited From
FlexGrid
Returns
void

onPastedCell

onPastedCell(e: CellRangeEventArgs): void

Raises the pastedCell event.

Parameters
Inherited From
FlexGrid
Returns
void

onPasting

onPasting(e: CellRangeEventArgs): boolean

Raises the pasting event.

Parameters
Inherited From
FlexGrid
Returns
boolean

onPastingCell

onPastingCell(e: CellRangeEventArgs): boolean

Raises the pastingCell event.

Parameters
Inherited From
FlexGrid
Returns
boolean

onPrepareCellForEdit

onPrepareCellForEdit(e: CellRangeEventArgs): void

Raises the prepareCellForEdit event.

Parameters
Inherited From
FlexGrid
Returns
void

onResizedColumn

onResizedColumn(e: CellRangeEventArgs): void

Raises the resizedColumn event.

Parameters
Inherited From
FlexGrid
Returns
void

onResizedRow

onResizedRow(e: CellRangeEventArgs): void

Raises the resizedRow event.

Parameters
Inherited From
FlexGrid
Returns
void

onResizingColumn

onResizingColumn(e: CellRangeEventArgs): boolean

Raises the resizingColumn event.

Parameters
Inherited From
FlexGrid
Returns
boolean

onResizingRow

onResizingRow(e: CellRangeEventArgs): boolean

Raises the resizingRow event.

Parameters
Inherited From
FlexGrid
Returns
boolean

onRowAdded

onRowAdded(e: CellRangeEventArgs): void

Raises the rowAdded event.

Parameters
Inherited From
FlexGrid
Returns
void

onRowEditEnded

onRowEditEnded(e: CellRangeEventArgs): void

Raises the rowEditEnded event.

Parameters
Inherited From
FlexGrid
Returns
void

onRowEditEnding

onRowEditEnding(e: CellRangeEventArgs): void

Raises the rowEditEnding event.

Parameters
Inherited From
FlexGrid
Returns
void

onRowEditStarted

onRowEditStarted(e: CellRangeEventArgs): void

Raises the rowEditStarted event.

Parameters
Inherited From
FlexGrid
Returns
void

onRowEditStarting

onRowEditStarting(e: CellRangeEventArgs): void

Raises the rowEditStarting event.

Parameters
Inherited From
FlexGrid
Returns
void

onScrollPositionChanged

onScrollPositionChanged(e?: EventArgs): void

Raises the scrollPositionChanged event.

Parameters
Inherited From
FlexGrid
Returns
void

onSelectionChanged

onSelectionChanged(e: CellRangeEventArgs): void

Raises the selectionChanged event.

Parameters
Inherited From
FlexGrid
Returns
void

onSelectionChanging

onSelectionChanging(e: CellRangeEventArgs): boolean

Raises the selectionChanging event.

Parameters
Inherited From
FlexGrid
Returns
boolean

onSortedColumn

onSortedColumn(e: CellRangeEventArgs): void

Raises the sortedColumn event.

Parameters
Inherited From
FlexGrid
Returns
void

onSortingColumn

onSortingColumn(e: CellRangeEventArgs): boolean

Raises the sortingColumn event.

Parameters
Inherited From
FlexGrid
Returns
boolean

onUpdatedLayout

onUpdatedLayout(e?: EventArgs): void

Raises the updatedLayout event.

Parameters
Inherited From
FlexGrid
Returns
void

onUpdatedView

onUpdatedView(e?: EventArgs): void

Raises the updatedView event.

Parameters
Inherited From
FlexGrid
Returns
void

onUpdatingLayout

onUpdatingLayout(e: CancelEventArgs): boolean

Raises the updatingLayout event.

Parameters
Inherited From
FlexGrid
Returns
boolean

onUpdatingView

onUpdatingView(e: CancelEventArgs): boolean

Raises the updatingView event.

Parameters
Inherited From
FlexGrid
Returns
boolean

refresh

refresh(fullUpdate?: boolean): void

Refreshes the grid display.

Parameters
Inherited From
FlexGrid
Returns
void

Static refreshAll

refreshAll(e?: HTMLElement): void

Refreshes all Wijmo controls contained in an HTML element.

This method is similar to invalidateAll, except the controls are updated immediately rather than after an interval.

Parameters
Inherited From
Control
Returns
void

refreshCells

refreshCells(fullUpdate: boolean, recycle?: boolean, state?: boolean): void

Refreshes the grid display.

Parameters
Inherited From
FlexGrid
Returns
void

removeEventListener

removeEventListener(target?: EventTarget, type?: string, fn?: any, capture?: boolean): number

Removes one or more event listeners attached to elements owned by this Control.

Parameters
Inherited From
Control
Returns
number

scrollIntoView

scrollIntoView(r: number, c: number): boolean

Scrolls the grid to bring a specific cell into view.

Parameters
Inherited From
FlexGrid
Returns
boolean

select

select(rng: any, show?: any): void

Selects a cell range and optionally scrolls it into view.

Parameters
Inherited From
FlexGrid
Returns
void

setCellData

setCellData(r: number, c: any, value: any, coerce?: boolean, invalidate?: boolean): boolean

Sets the value of a cell in the scrollable area of the grid.

Parameters
Inherited From
FlexGrid
Returns
boolean

setClipString

setClipString(text: string, rng?: CellRange): void

Parses a string into rows and columns and applies the content to a given range.

Hidden rows and columns are skipped.

Parameters
Inherited From
FlexGrid
Returns
void

showDetail

showDetail(row: number, col: number): void

Shows a dialog containing details for a given grid cell.

Parameters
Inherited From
PivotGrid
Returns
void

startEditing

startEditing(fullEdit?: boolean, r?: number, c?: number, focus?: boolean): boolean

Starts editing a given cell.

Editing in the FlexGrid is similar to editing in Excel: Pressing F2 or double-clicking a cell puts the grid in full-edit mode. In this mode, the cell editor remains active until the user presses Enter, Tab, or Escape, or until he moves the selection with the mouse. In full-edit mode, pressing the cursor keys does not cause the grid to exit edit mode.

Typing text directly into a cell puts the grid in quick-edit mode. In this mode, the cell editor remains active until the user presses Enter, Tab, or Escape, or any arrow keys.

Full-edit mode is normally used to make changes to existing values. Quick-edit mode is normally used for entering new data quickly.

While editing, the user can toggle between full and quick modes by pressing the F2 key.

Parameters
Inherited From
FlexGrid
Returns
boolean

Events

autoSizedColumn

Occurs after the user auto-sizes a column by double-clicking the right edge of a column header cell.

Inherited From
FlexGrid
Arguments
CellRangeEventArgs

autoSizedRow

Occurs after the user auto-sizes a row by double-clicking the bottom edge of a row header cell.

Inherited From
FlexGrid
Arguments
CellRangeEventArgs

autoSizingColumn

Occurs before the user auto-sizes a column by double-clicking the right edge of a column header cell.

Inherited From
FlexGrid
Arguments
CellRangeEventArgs

autoSizingRow

Occurs before the user auto-sizes a row by double-clicking the bottom edge of a row header cell.

Inherited From
FlexGrid
Arguments
CellRangeEventArgs

beginningEdit

Occurs before a cell enters edit mode.

Inherited From
FlexGrid
Arguments
CellRangeEventArgs

cellEditEnded

Occurs when a cell edit has been committed or canceled.

Inherited From
FlexGrid
Arguments
CellRangeEventArgs

cellEditEnding

Occurs when a cell edit is ending.

You can use this event to perform validation and prevent invalid edits. For example, the code below prevents users from entering values that do not contain the letter 'a'. The code demonstrates how you can obtain the old and new values before the edits are applied.

function cellEditEnding (sender, e) {

  // get old and new values
  var flex = sender,
      oldVal = flex.getCellData(e.row, e.col),
      newVal = flex.activeEditor.value;

  // cancel edits if newVal doesn't contain 'a'
  e.cancel = newVal.indexOf('a') < 0;
}

Setting the cancel parameter to true causes the grid to discard the edited value and keep the cell's original value.

If you also set the stayInEditMode parameter to true, the grid will remain in edit mode so the user can correct invalid entries before committing the edits.

Inherited From
FlexGrid
Arguments
CellEditEndingEventArgs

copied

Occurs after the user has copied the selection content to the clipboard by pressing one of the clipboard shortcut keys (see the autoClipboard property).

Inherited From
FlexGrid
Arguments
CellRangeEventArgs

copying

Occurs when the user is copying the selection content to the clipboard by pressing one of the clipboard shortcut keys (see the autoClipboard property).

The event handler may cancel the copy operation.

Inherited From
FlexGrid
Arguments
CellRangeEventArgs

deletedRow

Occurs after the user has deleted a row by pressing the Delete key (see the allowDelete property).

Inherited From
FlexGrid
Arguments
CellRangeEventArgs

deletingRow

Occurs when the user is deleting a selected row by pressing the Delete key (see the allowDelete property).

The event handler may cancel the row deletion.

Inherited From
FlexGrid
Arguments
CellRangeEventArgs

draggedColumn

Occurs when the user finishes dragging a column.

Inherited From
FlexGrid
Arguments
CellRangeEventArgs

draggedRow

Occurs when the user finishes dragging a row.

Inherited From
FlexGrid
Arguments
CellRangeEventArgs

draggingColumn

Occurs when the user starts dragging a column.

Inherited From
FlexGrid
Arguments
CellRangeEventArgs

draggingColumnOver

Occurs as the user drags a column to a new position.

The handler may cancel the event to prevent users from dropping columns at certain positions. For example:

// remember column being dragged
flex.draggingColumn.addHandler(function (s, e) {
    theColumn = s.columns[e.col].binding;
});

// prevent 'sales' column from being dragged to index 0
s.draggingColumnOver.addHandler(function (s, e) {
    if (theColumn == 'sales' && e.col == 0) {
        e.cancel = true;
    }
});
Inherited From
FlexGrid
Arguments
CellRangeEventArgs

draggingRow

Occurs when the user starts dragging a row.

Inherited From
FlexGrid
Arguments
CellRangeEventArgs

draggingRowOver

Occurs as the user drags a row to a new position.

Inherited From
FlexGrid
Arguments
CellRangeEventArgs

formatItem

Occurs when an element representing a cell has been created.

This event can be used to format cells for display. It is similar in purpose to the itemFormatter property, but has the advantage of allowing multiple independent handlers.

For example, this code removes the 'wj-wrap' class from cells in group rows:

flex.formatItem.addHandler(function (s, e) {
  if (flex.rows[e.row] instanceof wijmo.grid.GroupRow) {
    wijmo.removeClass(e.cell, 'wj-wrap');
  }
});
Inherited From
FlexGrid
Arguments
FormatItemEventArgs

gotFocus

Occurs when the control gets the focus.

Inherited From
Control
Arguments
EventArgs

groupCollapsedChanged

Occurs after a group has been expanded or collapsed.

Inherited From
FlexGrid
Arguments
CellRangeEventArgs

groupCollapsedChanging

Occurs when a group is about to be expanded or collapsed.

Inherited From
FlexGrid
Arguments
CellRangeEventArgs

itemsSourceChanged

Occurs after the grid has been bound to a new items source.

Inherited From
FlexGrid
Arguments
EventArgs

loadedRows

Occurs after the grid rows have been bound to items in the data source.

Inherited From
FlexGrid
Arguments
EventArgs

loadingRows

Occurs before the grid rows are bound to items in the data source.

Inherited From
FlexGrid
Arguments
CancelEventArgs

lostFocus

Occurs when the control loses the focus.

Inherited From
Control
Arguments
EventArgs

pasted

Occurs after the user has pasted content from the clipboard by pressing one of the clipboard shortcut keys (see the autoClipboard property).

Inherited From
FlexGrid
Arguments
CellRangeEventArgs

pastedCell

Occurs after the user has pasted content from the clipboard into a cell (see the autoClipboard property).

Inherited From
FlexGrid
Arguments
CellRangeEventArgs

pasting

Occurs when the user is pasting content from the clipboard by pressing one of the clipboard shortcut keys (see the autoClipboard property).

The event handler may cancel the copy operation.

Inherited From
FlexGrid
Arguments
CellRangeEventArgs

pastingCell

Occurs when the user is pasting content from the clipboard into a cell (see the autoClipboard property).

The event handler may cancel the copy operation.

Inherited From
FlexGrid
Arguments
CellRangeEventArgs

prepareCellForEdit

Occurs when an editor cell is created and before it becomes active.

Inherited From
FlexGrid
Arguments
CellRangeEventArgs

resizedColumn

Occurs when the user finishes resizing a column.

Inherited From
FlexGrid
Arguments
CellRangeEventArgs

resizedRow

Occurs when the user finishes resizing rows.

Inherited From
FlexGrid
Arguments
CellRangeEventArgs

resizingColumn

Occurs as columns are resized.

Inherited From
FlexGrid
Arguments
CellRangeEventArgs

resizingRow

Occurs as rows are resized.

Inherited From
FlexGrid
Arguments
CellRangeEventArgs

rowAdded

Occurs when the user creates a new item by editing the new row template (see the allowAddNew property).

The event handler may customize the content of the new item or cancel the new item creation.

Inherited From
FlexGrid
Arguments
CellRangeEventArgs

rowEditEnded

Occurs when a row edit has been committed or canceled.

Inherited From
FlexGrid
Arguments
CellRangeEventArgs

rowEditEnding

Occurs when a row edit is ending, before the changes are committed or canceled.

This event can be used in conjunction with the rowEditStarted event to implement deep-binding edit undos. For example:

// save deep bound values when editing starts
var itemData = {};
s.rowEditStarted.addHandler(function (s, e) {
  var item = s.collectionView.currentEditItem;
  itemData = {};
  s.columns.forEach(function (col) {
    if (col.binding.indexOf('.') > -1) { // deep binding
      var binding = new wijmo.Binding(col.binding);
      itemData[col.binding] = binding.getValue(item);
    }
  })
});

// restore deep bound values when edits are canceled
s.rowEditEnded.addHandler(function (s, e) {
  if (e.cancel) { // edits were canceled by the user
    var item = s.collectionView.currentEditItem;
    for (var k in itemData) {
      var binding = new wijmo.Binding(k);
      binding.setValue(item, itemData[k]);
    }
  }
  itemData = {};
});
Inherited From
FlexGrid
Arguments
CellRangeEventArgs

rowEditStarted

Occurs after a row enters edit mode.

Inherited From
FlexGrid
Arguments
CellRangeEventArgs

rowEditStarting

Occurs before a row enters edit mode.

Inherited From
FlexGrid
Arguments
CellRangeEventArgs

scrollPositionChanged

Occurs after the control has scrolled.

Inherited From
FlexGrid
Arguments
EventArgs

selectionChanged

Occurs after selection changes.

Inherited From
FlexGrid
Arguments
CellRangeEventArgs

selectionChanging

Occurs before selection changes.

Inherited From
FlexGrid
Arguments
CellRangeEventArgs

sortedColumn

Occurs after the user applies a sort by clicking on a column header.

Inherited From
FlexGrid
Arguments
CellRangeEventArgs

sortingColumn

Occurs before the user applies a sort by clicking on a column header.

Inherited From
FlexGrid
Arguments
CellRangeEventArgs

updatedLayout

Occurs after the grid has updated its internal layout.

Inherited From
FlexGrid
Arguments
EventArgs

updatedView

Occurs when the grid finishes creating/updating the elements that make up the current view.

The grid updates the view in response to several actions, including:

  • refreshing the grid or its data source,
  • adding, removing, or changing rows or columns,
  • resizing or scrolling the grid,
  • changing the selection.

Inherited From
FlexGrid
Arguments
EventArgs

updatingLayout

Occurs before the grid updates its internal layout.

Inherited From
FlexGrid
Arguments
CancelEventArgs

updatingView

Occurs when the grid starts creating/updating the elements that make up the current view.

Inherited From
FlexGrid
Arguments
CancelEventArgs