smart-webcomponents-angular
Version:
[](https://jqwidgets.com/license/)
799 lines • 84.3 kB
TypeScript
import { Grid } from './../index';
import { Scrolling, GridAppearance, GridAi, GridBehavior, GridColumnHeader, GridClipboard, GridColumn, GridContextMenu, GridColumnMenu, GridColumnGroup, GridConditionalFormatting, GridCharting, GridCheckBoxes, GridDataExport, GridDataSourceSettings, GridEditing, GridFiltering, GridFooter, GridGrouping, GridGroupHeader, GridHeader, GridLayout, GridPaging, GridPager, GridRowDetail, GridRow, GridCell, GridSummaryRow, GridStateSettings, GridSelection, GridSorting, GridUploadSettings } from './../index';
import { AfterViewInit, ElementRef, OnInit, OnChanges, OnDestroy, SimpleChanges, EventEmitter } from '@angular/core';
import { BaseElement } from './smart.element';
import * as i0 from "@angular/core";
export { GridAppearanceAutoGenerateRowLabelMode, GridAppearanceAutoGenerateColumnLabelMode, GridResizeMode, GridClipboardAutoFillMode, HorizontalAlignment, VerticalAlignment, Position, GridColumnFilterMenuMode, GridColumnSortOrder, GridConditionalFormattingCondition, GridDataExportPageOrientation, GridDataSourceSettingsSanitizeHTML, GridDataSourceSettingsDataFieldDataType, GridDataSourceSettingsDataSourceType, GridEditingAction, LayoutPosition, GridCommandDisplayMode, GridEditingMode, GridEditingAddNewRowDisplayMode, GridFilteringFilterRowApplyMode, GridFilteringFilterMenuMode, GridGroupingExpandMode, GridGroupingRenderMode, GridHeaderSearchCommand, GridPagerAutoEllipsis, Scrolling, GridSelectionMode, GridSelectionAction, GridSelectionCheckBoxesSelectAllMode, GridSortingMode, GridSortingCommandKey, GridAppearance, GridAi, GridBehavior, GridColumnHeader, GridClipboard, GridColumn, GridContextMenu, GridContextMenuDataSource, GridCommand, GridColumnMenu, GridColumnMenuDataSource, GridColumnGroup, GridConditionalFormatting, GridCharting, Dialog, GridCheckBoxes, GridDataExport, GridDataSourceSettings, GridDataSourceSettingsDataField, GridEditing, GridEditingCommandKeys, GridCommandKey, GridEditingCommandBar, GridEditingCommandBarDataSource, GridEditingCommandColumn, GridEditingCommandColumnDataSource, GridEditingAddNewRow, GridEditingAddNewColumn, GridFiltering, GridFilteringFilterRow, GridFilteringFilterMenu, GridFilteringFilterBuilder, GridFooter, GridGrouping, GridGroupingGroupBar, GridGroupingSummaryRow, GridGroupHeader, GridHeader, GridLayout, GridPaging, GridPagingSpinner, GridPager, GridPagerPageSizeSelector, GridPagerSummary, GridPagerNavigationButtons, GridPagerNavigationButtonsPrevNextButtons, GridPagerNavigationButtonsFirstLastButtons, GridPagerNavigationButtonsLabels, GridPagerNavigationInput, GridPagerPageIndexSelectors, GridRowDetail, GridRow, GridCell, GridSummaryRow, GridStateSettings, GridSelection, GridSelectionCheckBoxes, GridSorting, GridUploadSettings, ElementRenderMode } from './../index';
export { Smart } from './smart.element';
export { Grid } from './../index';
export { DataAdapter, Chart } from './../index';
export declare class GridComponent extends BaseElement implements OnInit, AfterViewInit, OnDestroy, OnChanges {
constructor(ref: ElementRef<Grid>);
private eventHandlers;
nativeElement: Grid;
/** @description Creates the component on demand.
* @param properties An optional object of properties, which will be added to the template binded ones.
*/
createComponent(properties?: {}): any;
/** @description An object containing settings related to the grid's appearance. */
get appearance(): GridAppearance;
set appearance(value: GridAppearance);
/** @description An object containing settings related to the grid's AI integration. */
get ai(): GridAi;
set ai(value: GridAi);
/** @description An object containing settings related to the grid's behavior. */
get behavior(): GridBehavior;
set behavior(value: GridBehavior);
/** @description Sets or gets the id of the current user. Has to correspond to the id of an item from the users property/array. Depending on the current user, different privileges are enabled. If no current user is set, privileges depend on the element's properties. */
get currentUser(): string | number;
set currentUser(value: string | number);
/** @description Describes the column header settings. */
get columnHeader(): GridColumnHeader;
set columnHeader(value: GridColumnHeader);
/** @description The clipboard property is used to enable/disable clipboard operations with Ctrl+C, Ctrl+X and Ctrl+V keyboard navigations.. */
get clipboard(): GridClipboard;
set clipboard(value: GridClipboard);
/** @description The columns property is used to describe all columns displayed in the grid. */
get columns(): {
label: string;
dataField: string;
}[] | string[] | number | GridColumn[];
set columns(value: {
label: string;
dataField: string;
}[] | string[] | number | GridColumn[]);
/** @description Context Menu is the drop-down menu displayed after right-clicking a Grid row. It allows you to delete row, edit cell or row depending on the edit mode. The 'contextMenuItemCustom' dataSource option allows you to add custom menu item to the context menu. You can replace the context menu by using the 'selector' property and setting it to ID of a Smart.Menu component. */
get contextMenu(): GridContextMenu;
set contextMenu(value: GridContextMenu);
/** @description Column Menu is the drop-down menu displayed after clicking the column header's drop-down button, which is displayed when you hover the column header. It allows you to customize column settings. For example: Sort, Filter or Group the Grid by the current column. */
get columnMenu(): GridColumnMenu;
set columnMenu(value: GridColumnMenu);
/** @description Describes the settings of the column groups. */
get columnGroups(): GridColumnGroup[];
set columnGroups(value: GridColumnGroup[]);
/** @description */
get dropDownMode(): boolean;
set dropDownMode(value: boolean);
/** @description Sets or gets details about conditional formatting to be applied to the Grid's cells. */
get conditionalFormatting(): GridConditionalFormatting[];
set conditionalFormatting(value: GridConditionalFormatting[]);
/** @description Sets the Grid Charting Data Visualization. */
get charting(): GridCharting;
set charting(value: GridCharting);
/** @description Sets the TreeGrid checkboxes. */
get checkBoxes(): GridCheckBoxes;
set checkBoxes(value: GridCheckBoxes);
/** @description Sets the Grid Data Export options. */
get dataExport(): GridDataExport;
set dataExport(value: GridDataExport);
/** @description Sets the grid's data source. The value of dataSource can be an instance of JQX.DataAdapter or an Array. */
get dataSource(): any;
set dataSource(value: any);
/** @description Sets the grid's data source settings when the dataSource property is set to an Array or URL. */
get dataSourceSettings(): GridDataSourceSettings;
set dataSourceSettings(value: GridDataSourceSettings);
/** @description Describes the grid's editing settings. */
get editing(): GridEditing;
set editing(value: GridEditing);
/** @description Describes the grid's filtering settings. */
get filtering(): GridFiltering;
set filtering(value: GridFiltering);
/** @description Describes the footer settings of the grid. */
get footer(): GridFooter;
set footer(value: GridFooter);
/** @description Sets or gets whether Excel-like formulas can be passed as cell values. Formulas are always preceded by the = sign and are re-evaluated when cell values are changed. This feature depends on the third-party free plug-in formula-parser (the file formula-parser.min.js has to be referenced). */
get formulas(): boolean;
set formulas(value: boolean);
/** @description Describes the grid's grouping settings. */
get grouping(): GridGrouping;
set grouping(value: GridGrouping);
/** @description Describes the settings for the group header. */
get groupHeader(): GridGroupHeader;
set groupHeader(value: GridGroupHeader);
/** @description Describes the header settings of the grid. */
get header(): GridHeader;
set header(value: GridHeader);
/** @description An object containing settings related to the grid's layout. */
get layout(): GridLayout;
set layout(value: GridLayout);
/** @description Sets or gets the unlockKey which unlocks the product. */
get unlockKey(): string;
set unlockKey(value: string);
/** @description Sets or gets the language. Used in conjunction with the property messages. */
get locale(): string;
set locale(value: string);
/** @description Keys handling. You can define a key like "Enter": "Tab" or set a function as a value. When the key is pressed, it will be mapped to the other key, action such as 'copy', 'copyPrev', 'copyNext' or 'delete' or just a function defined in your document. */
get keys(): any;
set keys(value: any);
/** @description Sets the messages values. */
get messages(): any;
set messages(value: any);
/** @description Callback function(chart: JQX.Chart) called when the chart has been initialized. You can use this function to customize the Chart element settings. */
get onCellValue(): {
(cell: GridCell): void;
};
set onCellValue(value: {
(cell: GridCell): void;
});
/** @description Callback function() called when the grid has been rendered. */
get onCellUpdate(): {
(cells: GridCell[], oldValues: any[], values: any[], confirm: {
(commit: boolean): void;
}): void;
};
set onCellUpdate(value: {
(cells: GridCell[], oldValues: any[], values: any[], confirm: {
(commit: boolean): void;
}): void;
});
/** @description Callback function() called when the grid has been rendered for first time and bindings are completed. The component is ready. */
get onCellRender(): {
(cell: GridCell): void;
};
set onCellRender(value: {
(cell: GridCell): void;
});
/** @description Describes the paging settings. */
get onCellBeginEdit(): {
(id: string, dataField: string, value: any): boolean;
};
set onCellBeginEdit(value: {
(id: string, dataField: string, value: any): boolean;
});
/** @description Describes the pager settings. */
get onCellEditRequest(): {
(id: string, dataField: string, value: any, oldValue: any, data: any): void;
};
set onCellEditRequest(value: {
(id: string, dataField: string, value: any, oldValue: any, data: any): void;
});
/** @description Sets the row details. */
get onCellValueChanged(): {
(id: string, dataField: string, value: any): boolean;
};
set onCellValueChanged(value: {
(id: string, dataField: string, value: any): boolean;
});
/** @description Sets or gets the rows CSS class rules. Different CSS class names are conditionally applied. Example: rowCSSRules: { 'cell-class-1': settings => settings.data.quantity === 5, 'cell-class-2': settings => settings.data.quantity < 5, 'cell-class-3': settings => settings.data.quantity > 5 }. The settings object contains the following properties: index, data, row, api. */
get onBeforeInit(): {
(): void;
};
set onBeforeInit(value: {
(): void;
});
/** @description Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts. */
get onInit(): {
(): void;
};
set onInit(value: {
(): void;
});
/** @description The rows property is used to describe all rows displayed in the grid. */
get onAfterInit(): {
(): void;
};
set onAfterInit(value: {
(): void;
});
/** @description Sets the scroll mode settings. */
get onChartInit(): any;
set onChartInit(value: any);
/** @description Describes the summary row settings. */
get onRender(): any;
set onRender(value: any);
/** @description Sets the grid's state settings. */
get onLoad(): any;
set onLoad(value: any);
/** @description Describes the selection settings. */
get onKey(): {
(event: KeyboardEvent): void;
};
set onKey(value: {
(event: KeyboardEvent): void;
});
/** @description Describes sorting settings. */
get onRowInit(): {
(index: number, row: GridRow): void;
};
set onRowInit(value: {
(index: number, row: GridRow): void;
});
/** @description Sets the grid users. Expects an array with 'id', 'name' and optionally 'color' and 'image' properties. */
get onRowDetailInit(): {
(index: number, row: GridRow, details: HTMLElement): void;
};
set onRowDetailInit(value: {
(index: number, row: GridRow, details: HTMLElement): void;
});
/** @description Sets the grid's image and filter upload settings for the image and attachment columns. */
get onRowDetailUpdated(): {
(index: number, row: GridRow, details: HTMLElement): void;
};
set onRowDetailUpdated(value: {
(index: number, row: GridRow, details: HTMLElement): void;
});
/** @description Sets the current data view. The possible values are 'grid', 'kanban' and 'card'. */
get onRowHistory(): {
(index: number, row: GridRow, history: any[]): void;
};
set onRowHistory(value: {
(index: number, row: GridRow, history: any[]): void;
});
/** @description undefined */
get onRowStyle(): {
(index: number, row: GridRow, history: any[]): void;
};
set onRowStyle(value: {
(index: number, row: GridRow, history: any[]): void;
});
/** @description undefined */
get onRowInserted(): {
(index: number[], row: GridRow[]): void;
};
set onRowInserted(value: {
(index: number[], row: GridRow[]): void;
});
/** @description undefined */
get onRowRemoved(): {
(indexes: number[], rows: GridRow[]): void;
};
set onRowRemoved(value: {
(indexes: number[], rows: GridRow[]): void;
});
/** @description undefined */
get onRowUpdate(): {
(index: number[], row: GridRow[], oldValues: any[], values: any[], confirm: {
(commit: boolean): void;
}): void;
};
set onRowUpdate(value: {
(index: number[], row: GridRow[], oldValues: any[], values: any[], confirm: {
(commit: boolean): void;
}): void;
});
/** @description undefined */
get onRowUpdated(): {
(index: number[], row: GridRow[]): void;
};
set onRowUpdated(value: {
(index: number[], row: GridRow[]): void;
});
/** @description undefined */
get onRowClass(): {
(index: number, data: any, row: GridRow[]): void;
};
set onRowClass(value: {
(index: number, data: any, row: GridRow[]): void;
});
/** @description undefined */
get onCellClass(): {
(index: number, dataField: string, cellValue: any, data: any, row: GridRow[]): void;
};
set onCellClass(value: {
(index: number, dataField: string, cellValue: any, data: any, row: GridRow[]): void;
});
/** @description undefined */
get onColumnInit(): {
(index: number, column: GridColumn): void;
};
set onColumnInit(value: {
(index: number, column: GridColumn): void;
});
/** @description undefined */
get onColumnInserted(): {
(index: number, column: GridColumn): void;
};
set onColumnInserted(value: {
(index: number, column: GridColumn): void;
});
/** @description undefined */
get onColumnRemoved(): {
(index: number, column: GridColumn): void;
};
set onColumnRemoved(value: {
(index: number, column: GridColumn): void;
});
/** @description undefined */
get onColumnUpdated(): {
(index: number, column: GridColumn): void;
};
set onColumnUpdated(value: {
(index: number, column: GridColumn): void;
});
/** @description undefined */
get onColumnClone(): {
(dataField: string, cloneColumnDataField: string, index: number, duplicateCells: boolean): void;
};
set onColumnClone(value: {
(dataField: string, cloneColumnDataField: string, index: number, duplicateCells: boolean): void;
});
/** @description undefined */
get onCommand(): {
(name: string, command: any, details: GridCell, event: Event | KeyboardEvent | PointerEvent, handled: boolean): void;
};
set onCommand(value: {
(name: string, command: any, details: GridCell, event: Event | KeyboardEvent | PointerEvent, handled: boolean): void;
});
/** @description undefined */
get paging(): GridPaging;
set paging(value: GridPaging);
/** @description undefined */
get pager(): GridPager;
set pager(value: GridPager);
/** @description undefined */
get rowDetail(): GridRowDetail;
set rowDetail(value: GridRowDetail);
/** @description undefined */
get rowCSSRules(): any;
set rowCSSRules(value: any);
/** @description undefined */
get rightToLeft(): boolean;
set rightToLeft(value: boolean);
/** @description undefined */
get rows(): GridRow[];
set rows(value: GridRow[]);
/** @description undefined */
get scrolling(): Scrolling | string;
set scrolling(value: Scrolling | string);
/** @description undefined */
get summaryRow(): GridSummaryRow;
set summaryRow(value: GridSummaryRow);
/** @description undefined */
get stateSettings(): GridStateSettings;
set stateSettings(value: GridStateSettings);
/** @description undefined */
get selection(): GridSelection;
set selection(value: GridSelection);
/** @description undefined */
get sorting(): GridSorting;
set sorting(value: GridSorting);
/** @description undefined */
get users(): any[];
set users(value: any[]);
/** @description undefined */
get uploadSettings(): GridUploadSettings;
set uploadSettings(value: GridUploadSettings);
/** @description undefined */
get view(): string;
set view(value: string);
/** @description This event is triggered, when the edit begins. After the event occurs, editing starts. If you need to prevent the editing for specific cells, rows or columns, you can call event.preventDefault();.
* @param event. The custom event. Custom event was created with: event.detail( id, dataField, row, column, cell, data, value)
* id - The edited row id.
* dataField - The edited column data field.
* row - The edited row.
* column - The edited column.
* cell - The edited cell.
* data - The edited row's data.
* value - The edited cell's value.
*/
onBeginEdit: EventEmitter<CustomEvent>;
/** @description This event is triggered, when the Grid's header toolbar is displayed and the 'OK' button of a header dropdown is clicked. For example, when you open the columns customize panel, reorder columns and click the 'OK' button.
* @param event. The custom event. Custom event was created with: event.detail( type)
* type - The type of dropdown. Possible values: 'filter', 'sort', 'search', 'group', 'format', 'customize'
*/
onBatchChange: EventEmitter<CustomEvent>;
/** @description This event is triggered, when the Grid's header toolbar is displayed and the 'Cancel' button of a header dropdown is clicked.
* @param event. The custom event. Custom event was created with: event.detail( type)
* type - The type of dropdown. Possible values: 'filter', 'sort', 'search', 'group', 'format', 'customize'
*/
onBatchCancel: EventEmitter<CustomEvent>;
/** @description This event is triggered, when the selection is changed. When you select with a drag, the event is triggered when the drag starts and ends.
* @param event. The custom event. Custom event was created with: event.detail( started, finished, originalEvent)
* started - The flag is <em>true</em>, when the selection starts. The flag is <em>false</em>, when the selection ends and when the user changes the selection by dragging.
* finished - The flag is <em>true</em>, when the selection ends. The flag is <em>false</em>, when the selection starts and when the user changes the selection by dragging.
* originalEvent - The original event object, which is 'pointer', 'touch' or 'mouse' Event object, depending on the device type and web browser
*/
onChange: EventEmitter<CustomEvent>;
/** @description This event is triggered, when the user clicks on the header of a column.
* @param event. The custom event. Custom event was created with: event.detail( column, dataField, originalEvent)
* column - The clicked column.
* dataField - The column's data field.
* originalEvent - The original event object, which is 'pointer', 'touch' or 'mouse' Event object, depending on the device type and web browser
*/
onColumnClick: EventEmitter<CustomEvent>;
/** @description This event is triggered, when the user double clicks on the header of a column.
* @param event. The custom event. Custom event was created with: event.detail( column, dataField, originalEvent)
* column - The double-clicked column.
* dataField - The column's data field.
* originalEvent - The original event object, which is 'pointer', 'touch' or 'mouse' Event object, depending on the device type and web browser
*/
onColumnDoubleClick: EventEmitter<CustomEvent>;
/** @description This event is triggered, when the user resized a column.
* @param event. The custom event. Custom event was created with: event.detail( column, dataField, oldWidth, width)
* column - The resized column.
* dataField - The column's data field.
* oldWidth - The old width of the column.
* width - The new width of the column.
*/
onColumnResize: EventEmitter<CustomEvent>;
/** @description This event is triggered, when the user starts a column drag.
* @param event. The custom event. Custom event was created with: event.detail( column, dataField, index, originalEvent)
* column - The column.
* dataField - The column's data field.
* index - The column's index
* originalEvent - The origianl Event object.
*/
onColumnDragStart: EventEmitter<CustomEvent>;
/** @description This event is triggered, when a column property is changed.
* @param event. The custom event. Custom event was created with: event.detail( column, propertyName, oldValue, value)
* column - The resized column.
* propertyName - The changed property's name.
* oldValue - The old value(s) of the column.
* value - The new value(s) of the column.
*/
onColumnChange: EventEmitter<CustomEvent>;
/** @description This event is triggered, when the user drags a column.
* @param event. The custom event. Custom event was created with: event.detail( column, dataField, index, data, originalEvent)
* column - The column.
* dataField - The column's data field.
* index - The column's index
* data - The dragging object. data.feedback and data.feedbackLine are HTML Elements which are displayed while the user drags. The object has error(), success() and data() methods which you can call to set the feedback state.
* originalEvent - The origianl Event object.
*/
onColumnDragging: EventEmitter<CustomEvent>;
/** @description This event is triggered, when the user drops a column.
* @param event. The custom event. Custom event was created with: event.detail( column, dataField, index, newIndex, data, originalEvent)
* column - The column.
* dataField - The column's data field.
* index - The column's index
* newIndex - The column's new index
* data - The dragging object. data.feedback and data.feedbackLine are HTML Elements which are displayed while the user drags. The object has error(), success() and data() methods which you can call to set the feedback state.
* originalEvent - The origianl Event object.
*/
onColumnDragEnd: EventEmitter<CustomEvent>;
/** @description This event is triggered, when the user reorders a column.
* @param event. The custom event. Custom event was created with: event.detail( column, dataField, index, newIndex, data, originalEvent)
* column - The column.
* dataField - The column's data field.
* index - The column's index
* newIndex - The column's new index
* data - The dragging object. data.feedback and data.feedbackLine are HTML Elements which are displayed while the user drags. The object has error(), success() and data() methods which you can call to set the feedback state.
* originalEvent - The origianl Event object.
*/
onColumnReorder: EventEmitter<CustomEvent>;
/** @description This event is triggered, when the user enters a comment in the row edit dialog.
* @param event. The custom event. Custom event was created with: event.detail( id, comment)
* id - The row's id.
* comment - The comment object. The comment object has 'text: string', 'id: string', 'userId: string | number', and 'time: date' fields. The 'text' is the comment's text. 'id' is the comment's unique id, 'userId' is the user's id who entered the comment and 'time' is a javascript date object.
*/
onCommentAdd: EventEmitter<CustomEvent>;
/** @description This event is triggered, when the user removes a comment in the row edit dialog.
* @param event. The custom event. Custom event was created with: event.detail( id, comment)
* id - The row's id.
* comment - The comment object. The comment object has 'text: string', 'id: string', 'userId: string | number', and 'time: date' fields. The 'text' is the comment's text. 'id' is the comment's unique id, 'userId' is the user's id who entered the comment and 'time' is a javascript date object.
*/
onCommentRemove: EventEmitter<CustomEvent>;
/** @description This event is triggered, when the user clicks on a context menu item.
* @param event. The custom event. Custom event was created with: event.detail( id, dataField, command)
* id - The row's id.
* dataField - The column's data field.
* command - Command function.
*/
onContextMenuItemClick: EventEmitter<CustomEvent>;
/** @description This event is triggered, when the user starts a row drag.
* @param event. The custom event. Custom event was created with: event.detail( row, id, index, originalEvent)
* row - The row.
* id - The row's id
* index - The row's index
* originalEvent - The origianl Event object.
*/
onRowDragStart: EventEmitter<CustomEvent>;
/** @description This event is triggered, when the user drags a row.
* @param event. The custom event. Custom event was created with: event.detail( row, id, index, data, originalEvent)
* row - The row.
* id - The row's id
* index - The row's index
* data - The dragging object. data.feedback and data.feedbackLine are HTML Elements which are displayed while the user drags. The object has error(), success() and data() methods which you can call to set the feedback state.
* originalEvent - The origianl Event object.
*/
onRowDragging: EventEmitter<CustomEvent>;
/** @description This event is triggered, when the user drags a row.
* @param event. The custom event. Custom event was created with: event.detail( row, id, index, newIndex, data, originalEvent)
* row - The row.
* id - The row's id
* index - The row's index
* newIndex - The row's new index
* data - The dragging object. data.feedback and data.feedbackLine are HTML Elements which are displayed while the user drags. The object has error(), success() and data() methods which you can call to set the feedback state.
* originalEvent - The origianl Event object.
*/
onRowDragEnd: EventEmitter<CustomEvent>;
/** @description This event is triggered, when the user reorders a row.
* @param event. The custom event. Custom event was created with: event.detail( row, id, index, newIndex, data, originalEvent)
* row - The row.
* id - The row's id
* index - The row's index
* newIndex - The row's new index
* data - The dragging object. data.feedback and data.feedbackLine are HTML Elements which are displayed while the user drags. The object has error(), success() and data() methods which you can call to set the feedback state.
* originalEvent - The origianl Event object.
*/
onRowReorder: EventEmitter<CustomEvent>;
/** @description This event is triggered, when the user expands a row of the grid. The Grid is in TreeGrid/Grouping mode.
* @param event. The custom event. Custom event was created with: event.detail( row, id, originalEvent)
* row - The expanded row.
* id - The row's id
* originalEvent - The original event object, which is 'pointer', 'touch' or 'mouse' Event object, depending on the device type and web browser
*/
onRowExpand: EventEmitter<CustomEvent>;
/** @description This event is triggered, when the user collapsed a row of the grid. The Grid is in TreeGrid/Grouping mode.
* @param event. The custom event. Custom event was created with: event.detail( row, id, originalEvent)
* row - The collapsed row.
* id - The row's id
* originalEvent - The original event object, which is 'pointer', 'touch' or 'mouse' Event object, depending on the device type and web browser
*/
onRowCollapse: EventEmitter<CustomEvent>;
/** @description This event is triggered, when the user clicks on a row of the grid.
* @param event. The custom event. Custom event was created with: event.detail( row, originalEvent, id, data, isRightClick, pageX, pageY)
* row - The clicked row.
* originalEvent - The original event object, which is 'pointer', 'touch' or 'mouse' Event object, depending on the device type and web browser
* id - Gets the row id.
* data - Gets the row data.
* isRightClick - Gets whether the pointing device's right button is clicked.
* pageX - Gets the click's X position.
* pageY - Gets the click's Y position.
*/
onRowClick: EventEmitter<CustomEvent>;
/** @description This event is triggered, when the user double clicks on a row of the grid.
* @param event. The custom event. Custom event was created with: event.detail( row, originalEvent, id, data, isRightClick, pageX, pageY)
* row - The double-clicked row.
* originalEvent - The original event object, which is 'pointer', 'touch' or 'mouse' Event object, depending on the device type and web browser
* id - Gets the row id.
* data - Gets the row data.
* isRightClick - Gets whether the pointing device's right button is clicked.
* pageX - Gets the click's X position.
* pageY - Gets the click's Y position.
*/
onRowDoubleClick: EventEmitter<CustomEvent>;
/** @description This event is triggered, when the user resized a row.
* @param event. The custom event. Custom event was created with: event.detail( row, id, oldHeight, height)
* row - The resized row.
* id - Gets the row id.
* oldHeight - The old height of the row.
* height - The new height of the row.
*/
onRowResize: EventEmitter<CustomEvent>;
/** @description This event is triggered, when the user clicks on the row header's star.
* @param event. The custom event. Custom event was created with: event.detail( row, originalEvent, id, value)
* row - The clicked row.
* originalEvent - The original event object, which is 'pointer', 'touch' or 'mouse' Event object, depending on the device type and web browser
* id - Gets the row id.
* value - Gets whether the row is starred or not.
*/
onRowStarred: EventEmitter<CustomEvent>;
/** @description This event is triggered, when the user clicks on a cell of the grid.
* @param event. The custom event. Custom event was created with: event.detail( cell, originalEvent, id, dataField, value, isRightClick, pageX, pageY)
* cell - The clicked cell.
* originalEvent - The original event object, which is 'pointer', 'touch' or 'mouse' Event object, depending on the device type and web browser
* id - Gets the row id.
* dataField - Gets the column dataField.
* value - Gets the cell value.
* isRightClick - Gets whether the pointing device's right button is clicked.
* pageX - Gets the click's X position.
* pageY - Gets the click's Y position.
*/
onCellClick: EventEmitter<CustomEvent>;
/** @description This event is triggered, when the user double clicks on a cell of the grid.
* @param event. The custom event. Custom event was created with: event.detail( cell, originalEvent, id, dataField, value, isRightClick, pageX, pageY)
* cell - The double-clicked cell.
* originalEvent - The original event object, which is 'pointer', 'touch' or 'mouse' Event object, depending on the device type and web browser
* id - Gets the row id.
* dataField - Gets the column dataField.
* value - Gets the cell value.
* isRightClick - Gets whether the pointing device's right button is clicked.
* pageX - Gets the click's X position.
* pageY - Gets the click's Y position.
*/
onCellDoubleClick: EventEmitter<CustomEvent>;
/** @description This event is triggered, when the edit ends.
* @param event. The custom event. Custom event was created with: event.detail( id, dataField, row, column, cell, data, value)
* id - The edited row id.
* dataField - The edited column data field.
* row - The edited row.
* column - The edited column.
* cell - The edited cell.
* data - The edited row's data.
* value - The edited cell's value.
*/
onEndEdit: EventEmitter<CustomEvent>;
/** @description This event is triggered, when a filter is added or removed.
* @param event. The custom event. Custom event was created with: event.detail( columns, data, expressions)
* columns - Array of columns.
* data - Array of {dataField: string, filter: object}. <em>dataField</em> is the column's data field. <em>filter</em> is a FilterGroup object.
* expressions - Array of {dataField: string, filter: string}. <em>dataField</em> is the column's data field. <em>filter</em> is a filter expression like 'startsWith B'. In each array item, you will have an object with column's name and filter string. Example: [['firstName', 'contains Andrew or contains Nancy'], ['quantity', '<= 3 and >= 8']], [['firstName', 'EQUAL' 'Andrew' or 'EQUAL' 'Antoni' or 'EQUAL' 'Beate']], [['lastName','CONTAINS' 'burke' or 'CONTAINS' 'peterson']]. Filter conditions used in the filter expressions: '=', 'EQUAL','<>', 'NOT_EQUAL', '!=', '<', 'LESS_THAN','>', 'GREATER_THAN', '<=', 'LESS_THAN_OR_EQUAL', '>=', 'GREATER_THAN_OR_EQUAL','starts with', 'STARTS_WITH','ends with', 'ENDS_WITH', '', 'EMPTY', 'CONTAINS','DOES_NOT_CONTAIN', 'NULL','NOT_NULL'
*/
onFilter: EventEmitter<CustomEvent>;
/** @description This event is triggered, when the rows grouping is changed.
* @param event. The custom event. Custom event was created with: event.detail( groups)
* groups - Array of column data fields.
*/
onGroup: EventEmitter<CustomEvent>;
/** @description This event is triggered, when the add new column dialog is opened.
* @param event. The custom event. Custom event was created with: event.detail( dataField)
* dataField - The column data field.
*/
onOpenColumnDialog: EventEmitter<CustomEvent>;
/** @description This event is triggered, when the add new column dialog is closed.
* @param event. The custom event. Custom event was created with: event.detail( dataField)
* dataField - The column data field.
*/
onCloseColumnDialog: EventEmitter<CustomEvent>;
/** @description This event is triggered, when the grid is resized.
* @param event. The custom event. */
onResize: EventEmitter<CustomEvent>;
/** @description This event is triggered when the user touches and holds on the row for at least 300ms.
* @param event. The custom event. Custom event was created with: event.detail( row, originalEvent)
* row - The tapped row.
* originalEvent - The original event object, which is 'pointer', 'touch' or 'mouse' Event object, depending on the device type and web browser
*/
onRowTap: EventEmitter<CustomEvent>;
/** @description This event is triggered when the user touches and holds on the cell for at least 300ms.
* @param event. The custom event. Custom event was created with: event.detail( cell, originalEvent)
* cell - The tapped row.
* originalEvent - The original event object, which is 'pointer', 'touch' or 'mouse' Event object, depending on the device type and web browser
*/
onCellTap: EventEmitter<CustomEvent>;
/** @description This event is triggered, when the user changes the pages.
* @param event. The custom event. */
onPage: EventEmitter<CustomEvent>;
/** @description This event is triggered, when a sorting column is added or removed.
* @param event. The custom event. Custom event was created with: event.detail( columns, data, sortDataFields, sortDataTypes, sortOrders, sortIndexes)
* columns - Array of columns.
* data - Array of {dataField: string, sortOrder: string, sortIndex: number}. <em>dataField</em> is the column's data field. <em>sortOrder</em> is 'asc' or 'desc', <em>sortIndex</em> is the index of the column in multi column sorting.
* sortDataFields - Array of column data fields.
* sortDataTypes - Array of column data types. The values in the array would be 'string', 'date', 'boolean' or 'number'.
* sortOrders - Array of column orders. The values in the array would be 'asc' or 'desc'.
* sortIndexes - Array of column sort indexes. When multiple sorting is applied the sort index is an important parameter as it specifies the priority of sorting.
*/
onSort: EventEmitter<CustomEvent>;
/** @description This event is triggered, when the user reaches the bottom of the grid.
* @param event. The custom event. */
onScrollBottomReached: EventEmitter<CustomEvent>;
/** @description This event is triggered, when the user reaches the top of the grid.
* @param event. The custom event. */
onScrollTopReached: EventEmitter<CustomEvent>;
/** @description Adds a row. When batch editing is enabled, the row is not saved until the batch edit is saved.
* @param {any} data. row data matching the data source
* @param {boolean} insertAtBottom?. Determines whether to add the new row to the bottom or top of the collection. The default value is 'true'
* @param {{(row: GridRow): void}} callback?. Sets a callback function, which is called after the new row is added. The callback's argument is the new row.
*/
addRow(data: any, insertAtBottom?: boolean, callback?: {
(row: GridRow): void;
}): void;
/** @description Adds a new row and puts it into edit mode. When batch editing is enabled, the row is not saved until the batch edit is saved.
* @param {string} position?. 'near' or 'far'
* @returns {boolean}
*/
addNewRow(position?: any): Promise<any>;
addNewRowSync(position?: any): boolean;
/** @description Adds a new column.
* @param {any} column. A Grid column object. See 'columns' property.
* @returns {boolean}
*/
addNewColumn(column: any): Promise<any>;
addNewColumnSync(column: any): boolean;
/** @description Adds a new unbound row to the top or bottom. Unbound rows are not part of the Grid's dataSource. They become part of the dataSource, after an unbound row is edited.
* @param {number} count. The count of unbound rows.
* @param {string} position?. 'near' or 'far'
* @returns {boolean}
*/
addUnboundRow(count: any, position?: any): Promise<any>;
addUnboundRowSync(count: any, position?: any): boolean;
/** @description Adds a filter to a column. This method will apply a filter to the Grid data. Example for adding multiple filters to a column: grid.addFilter('lastName', ['CONTAINS "burke"', 'or', 'CONTAINS "peterson"']). Example for adding single filter to a column: grid.addFilter('lastName', 'CONTAINS "burke"'). Example for adding numeric filter: grid.addFilter('quantity', '<= 5')
* @param {string} dataField. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
* @param {string} filter. Filter expression like: 'startsWith B'. Example 2: ['contains Andrew or contains Nancy'], Example 3: ['quantity', '<= 3 and >= 8']. Filter conditions which you can use in the expressions: '=', 'EQUAL','<>', 'NOT_EQUAL', '!=', '<', 'LESS_THAN','>', 'GREATER_THAN', '<=', 'LESS_THAN_OR_EQUAL', '>=', 'GREATER_THAN_OR_EQUAL','starts with', 'STARTS_WITH','ends with', 'ENDS_WITH', '', 'EMPTY', 'CONTAINS','DOES_NOT_CONTAIN', 'NULL','NOT_NULL'
* @param {boolean} refreshFilters?. Set this to false, if you will use multiple 'addFilter' calls. By doing this, you will avoid unnecessary renders.
*/
addFilter(dataField: string, filter: string, refreshFilters?: boolean): void;
/** @description Groups the Grid by a data field. This method will add a group to the Grid when grouping is enabled.
* @param {string} dataField. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
*/
addGroup(dataField: string): void;
/** @description Sorts the Grid by a data field. This method will add a sorting to the Grid when sorting is enabled.
* @param {string} dataField. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
* @param {string} sortOrder. column's sort order. Use 'asc' or 'desc'.
*/
addSort(dataField: string, sortOrder: string): void;
/** @description Auto-sizes grid rows. This method will update the height of all Grid rows.
*/
autoSizeRows(): void;
/** @description Auto-sizes grid columns. This method will update the width of all Grid columns.
*/
autoSizeColumns(): void;
/** @description Auto-sizes grid column. This method will update the width of a Grid column by measuring the cells and column header label width.
* @param {string} dataField?. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
*/
autoSizeColumn(dataField?: string): void;
/** @description This method returns true, if all rows in the Grid are selected.
* @returns {boolean}
*/
areAllRowsSelected(): Promise<any>;
areAllRowsSelectedSync(): boolean;
/** @description Starts an update operation. This is appropriate when calling multiple methods or set multiple properties at once.
*/
beginUpdate(): void;
/** @description Begins row, cell or column. This method allows you to programmatically start a cell, row or column editing. After calling it, an editor HTMLElement will be created and displayed in the Grid.
* @param {string | number} rowId. row bound id
* @param {string} dataField?. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
*/
beginEdit(rowId: string | number, dataField?: string): void;
/** @description Clears all filters. Refreshes the view and updates all filter input components.
*/
clearFilter(): void;
/** @description Clears all data groups. Refreshes the view and updates the DataGrid component.
*/
clearGroups(): void;
/** @description Clears all sorting. Refreshes the view and updates the DataGrid component.
*/
clearSort(): void;
/** @description Clears the selection that user have made. All row, cell and column selection highlights will be removed.
*/
clearSelection(): void;
/** @description Cancels the editing. This method closes the cell editor and cancels the changes.
*/
cancelEdit(): void;
/** @description Checks a TreeGrid row. This method updates the row's check-box.
* @param {string | number} rowId. row bound id
*/
checkRow(rowId: string | number): void;
/** @description Checks all TreeGrid or Grouping rows. This method updates all check-boxes in the TreeGrid or Grouping rows.
*/
checkAllRows(): void;
/** @description Clears the user selection and empties the data source. The Grid will display 'No Rows' in the view.
*/
clearRows(): void;
/** @description Closes the column drop-down menu.
*/
closeMenu(): void;
/** @description Collapses a TreeGrid or Grouping row.
* @param {string | number} rowId. row bound id
*/
collapseRow(rowId: string | number): void;
/** @description Collapses all TreeGrid or Grouping rows.
*/
collapseAllRows(): void;
/** @description Creates a Chart, when charting is enabled.
* @param {string} type. Chart's type
* @param {any} dataSource?. Chart's data source
*/
createChart(type: string, dataSource?: any): void;
/** @description Delete a row. When batch editing is enabled, the row is not saved until the batch edit is saved.
* @param {string | number} rowId. row bound id
* @param {{(row: GridRow): void}} callback?. Sets a callback function, which is called after the row is deleted. The callback's argument is the deleted row.
*/
deleteRow(rowId: string | number, callback?: {
(row: GridRow): void;
}): void;
/** @description Scrolls to a row or cell. This method scrolls to a row or cell, when scrolling is necessary. If pagination is enabled, it will automatically change the page.
* @param {string | number} rowId. row bound id
* @param {string} dataField?. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
* @returns {boolean}
*/
ensureVisible(rowId: any, dataField?: any): Promise<any>;
ensureVisibleSync(rowId: any, dataField?: any): boolean;
/** @description Ends the editing. This method confirms all changes and closes the opened cell editor(s).
*/
endEdit(): void;
/** @description Ends the update operation. This method will resume the rendering and will refresh the Grid.
* @param {boolean} refresh?. The flag that control the calls of the refresh method.
*/
endUpdate(refresh?: boolean): void;
/** @description Expands a TreeGrid or Grouping row. For example, if you want to expand the first group, then its second sub grup, then the first sub sub group, you can use: grid.expandRow('0.1.0');
* @param {string | number} rowId. row bound id
*/
expandRow(rowId: string | number): void;
/** @description Expands rows to a given group level. For example 'grid.expandRowsToGroupLevel(1);' means that all groups at the root level will be expanded.
* @param {number} level. row group level
*/
expandRowsToGroupLevel(level: number): void;
/** @description Expands all TreeGrid or Grouping rows.
*/
expandAllRows(): void;
/** @description Exports the Grid data to .XLSX, .PDF, .JSON, .XML, .CSV, .TSV, .HTML, .JPEG or .PNG. The method uses the options of the dataExport property.
* @param {string} Dataformat. 'xlsx', 'pdf', 'json', 'xml', 'csv', 'tsv', 'html', 'png', 'jpeg'.
* @param {any} callback?. A callback that allows to format the exported data based on a condition. For additional details, refer to the Smart Export Documentation.
* @param {any} dataCallback?. A callback that allows to change the exported data.
*/
exportData(Dataformat: string, callback?: any, dataCallback?: any): void;
/** @description Finds entries by using a query and returns an array of row ids. Example: const rows = grid.find('nancy'); returns all rows that have 'nancy' value. Example 2: const rows = grid.find('nancy, davolio'); returns all rows that have 'nancy' and 'davolio' values in the same row. Example 3: const rows = grid.find(5, 'quantity', '>'); returns all rows where the value of the 'quantity' field is > 5.
* @param {string} query. Search query
* @param {string} dataField?. Column data field.
* @param {string} condition?. Conditions which you can use in the expressions: '=', 'EQUAL','<>', 'NOT_EQUAL', '!=', '<', 'LESS_THAN','>', 'GREATER_THAN', '<=', 'LESS_THAN_OR_EQUAL', '>=', 'GREATER_THAN_OR_EQUAL','starts with