UNPKG

smart-webcomponents-react

Version:

[![Price](https://img.shields.io/badge/price-COMMERCIAL-00JS8f7.svg)](https://jqwidgets.com/license/)

907 lines 82.7 kB
import React from "react"; import { GridProperties } from "./../index"; import { Scrolling, GridAppearance, AI, 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'; export { GridProperties } from "./../index"; 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, AI, 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 } from './../index'; export { DataAdapter, Chart } from './../index'; declare let Smart: any; export { Smart }; export interface GridProps extends GridProperties { className?: string; style?: React.CSSProperties; onBeginEdit?: ((event?: Event) => void) | undefined; onBatchChange?: ((event?: Event) => void) | undefined; onBatchCancel?: ((event?: Event) => void) | undefined; onChange?: ((event?: Event) => void) | undefined; onColumnClick?: ((event?: Event) => void) | undefined; onColumnDoubleClick?: ((event?: Event) => void) | undefined; onColumnResize?: ((event?: Event) => void) | undefined; onColumnDragStart?: ((event?: Event) => void) | undefined; onColumnChange?: ((event?: Event) => void) | undefined; onColumnDragging?: ((event?: Event) => void) | undefined; onColumnDragEnd?: ((event?: Event) => void) | undefined; onColumnReorder?: ((event?: Event) => void) | undefined; onCommentAdd?: ((event?: Event) => void) | undefined; onCommentRemove?: ((event?: Event) => void) | undefined; onContextMenuItemClick?: ((event?: Event) => void) | undefined; onRowDragStart?: ((event?: Event) => void) | undefined; onRowDragging?: ((event?: Event) => void) | undefined; onRowDragEnd?: ((event?: Event) => void) | undefined; onRowReorder?: ((event?: Event) => void) | undefined; onRowExpand?: ((event?: Event) => void) | undefined; onRowCollapse?: ((event?: Event) => void) | undefined; onRowClick?: ((event?: Event) => void) | undefined; onRowDoubleClick?: ((event?: Event) => void) | undefined; onRowResize?: ((event?: Event) => void) | undefined; onRowStarred?: ((event?: Event) => void) | undefined; onCellClick?: ((event?: Event) => void) | undefined; onCellDoubleClick?: ((event?: Event) => void) | undefined; onEndEdit?: ((event?: Event) => void) | undefined; onFilter?: ((event?: Event) => void) | undefined; onGroup?: ((event?: Event) => void) | undefined; onOpenColumnDialog?: ((event?: Event) => void) | undefined; onCloseColumnDialog?: ((event?: Event) => void) | undefined; onResize?: ((event?: Event) => void) | undefined; onRowTap?: ((event?: Event) => void) | undefined; onCellTap?: ((event?: Event) => void) | undefined; onPage?: ((event?: Event) => void) | undefined; onSort?: ((event?: Event) => void) | undefined; onScrollBottomReached?: ((event?: Event) => void) | undefined; onScrollTopReached?: ((event?: Event) => void) | undefined; onCreate?: ((event?: Event) => void) | undefined; onReady?: ((event?: Event) => void) | undefined; } /** Data Grid UI Component that covers everything from paging, sorting, grouping, filtering, and editing to row and column virtualization, right-to-left layout, export to Excel and PDF and Accessibility. */ export declare class Grid extends React.Component<React.HTMLAttributes<Element> & GridProps, any> { private _id; private nativeElement; private componentRef; get id(): string; /** An object containing settings related to the grid's appearance. * Property type: GridAppearance */ get appearance(): GridAppearance; set appearance(value: GridAppearance); /** An object containing settings related to the grid's AI integration. * Property type: AI */ get ai(): AI; set ai(value: AI); /** An object containing settings related to the grid's behavior. * Property type: GridBehavior */ get behavior(): GridBehavior; set behavior(value: GridBehavior); /** 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. * Property type: string | number */ get currentUser(): string | number; set currentUser(value: string | number); /** Describes the column header settings. * Property type: GridColumnHeader */ get columnHeader(): GridColumnHeader; set columnHeader(value: GridColumnHeader); /** The clipboard property is used to enable/disable clipboard operations with Ctrl+C, Ctrl+X and Ctrl+V keyboard navigations.. * Property type: GridClipboard */ get clipboard(): GridClipboard; set clipboard(value: GridClipboard); /** The columns property is used to describe all columns displayed in the grid. * Property type: {label: string, dataField: string}[] | string[] | number | GridColumn[] */ get columns(): { label: string; dataField: string; }[] | string[] | number | GridColumn[]; set columns(value: { label: string; dataField: string; }[] | string[] | number | GridColumn[]); /** 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. * Property type: GridContextMenu */ get contextMenu(): GridContextMenu; set contextMenu(value: GridContextMenu); /** 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. * Property type: GridColumnMenu */ get columnMenu(): GridColumnMenu; set columnMenu(value: GridColumnMenu); /** Describes the settings of the column groups. * Property type: GridColumnGroup[] */ get columnGroups(): GridColumnGroup[]; set columnGroups(value: GridColumnGroup[]); /** * Property type: boolean */ get dropDownMode(): boolean; set dropDownMode(value: boolean); /** Sets or gets details about conditional formatting to be applied to the Grid's cells. * Property type: GridConditionalFormatting[] */ get conditionalFormatting(): GridConditionalFormatting[]; set conditionalFormatting(value: GridConditionalFormatting[]); /** Sets the Grid Charting Data Visualization. * Property type: GridCharting */ get charting(): GridCharting; set charting(value: GridCharting); /** Sets the TreeGrid checkboxes. * Property type: GridCheckBoxes */ get checkBoxes(): GridCheckBoxes; set checkBoxes(value: GridCheckBoxes); /** Sets the Grid Data Export options. * Property type: GridDataExport */ get dataExport(): GridDataExport; set dataExport(value: GridDataExport); /** Sets the grid's data source. The value of dataSource can be an instance of JQX.DataAdapter or an Array. * Property type: any */ get dataSource(): any; set dataSource(value: any); /** Sets the grid's data source settings when the dataSource property is set to an Array or URL. * Property type: GridDataSourceSettings */ get dataSourceSettings(): GridDataSourceSettings; set dataSourceSettings(value: GridDataSourceSettings); /** Describes the grid's editing settings. * Property type: GridEditing */ get editing(): GridEditing; set editing(value: GridEditing); /** Describes the grid's filtering settings. * Property type: GridFiltering */ get filtering(): GridFiltering; set filtering(value: GridFiltering); /** Describes the footer settings of the grid. * Property type: GridFooter */ get footer(): GridFooter; set footer(value: GridFooter); /** 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). * Property type: boolean */ get formulas(): boolean; set formulas(value: boolean); /** Describes the grid's grouping settings. * Property type: GridGrouping */ get grouping(): GridGrouping; set grouping(value: GridGrouping); /** Describes the settings for the group header. * Property type: GridGroupHeader */ get groupHeader(): GridGroupHeader; set groupHeader(value: GridGroupHeader); /** Describes the header settings of the grid. * Property type: GridHeader */ get header(): GridHeader; set header(value: GridHeader); /** An object containing settings related to the grid's layout. * Property type: GridLayout */ get layout(): GridLayout; set layout(value: GridLayout); /** Sets or gets the unlockKey which unlocks the product. * Property type: string */ get unlockKey(): string; set unlockKey(value: string); /** Sets or gets the language. Used in conjunction with the property messages. * Property type: string */ get locale(): string; set locale(value: string); /** 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. * Property type: any */ get keys(): any; set keys(value: any); /** Sets the messages values. * Property type: any */ get messages(): any; set messages(value: any); /** Callback function(chart: JQX.Chart) called when the chart has been initialized. You can use this function to customize the Chart element settings. * Property type: {(cell: GridCell): void} */ get onCellValue(): { (cell: GridCell): void; }; set onCellValue(value: { (cell: GridCell): void; }); /** Callback function() called when the grid has been rendered. * Property type: {(cells: GridCell[], oldValues: any[], values: any[], confirm: {(commit: boolean): void}): void} */ 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; }); /** Callback function() called when the grid has been rendered for first time and bindings are completed. The component is ready. * Property type: {(cell: GridCell): void} */ get onCellRender(): { (cell: GridCell): void; }; set onCellRender(value: { (cell: GridCell): void; }); /** Describes the paging settings. * Property type: {(id: string, dataField: string, value: any): boolean} */ get onCellBeginEdit(): { (id: string, dataField: string, value: any): boolean; }; set onCellBeginEdit(value: { (id: string, dataField: string, value: any): boolean; }); /** Describes the pager settings. * Property type: {(id: string, dataField: string, value: any, oldValue: any, data: any): void} */ 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; }); /** Sets the row details. * Property type: {(id: string, dataField: string, value: any): boolean} */ get onCellValueChanged(): { (id: string, dataField: string, value: any): boolean; }; set onCellValueChanged(value: { (id: string, dataField: string, value: any): boolean; }); /** Sets or gets the rows CSS class rules. Different CSS class names are conditionally applied. Example: rowCSSRules: { 'cell-class-1': settings =&gt; settings.data.quantity === 5, 'cell-class-2': settings =&gt; settings.data.quantity &lt; 5, 'cell-class-3': settings =&gt; settings.data.quantity &gt; 5 }. The settings object contains the following properties: index, data, row, api. * Property type: {(): void} */ get onBeforeInit(): { (): void; }; set onBeforeInit(value: { (): void; }); /** Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts. * Property type: {(): void} */ get onInit(): { (): void; }; set onInit(value: { (): void; }); /** The rows property is used to describe all rows displayed in the grid. * Property type: {(): void} */ get onAfterInit(): { (): void; }; set onAfterInit(value: { (): void; }); /** Sets the scroll mode settings. * Property type: any */ get onChartInit(): any; set onChartInit(value: any); /** Describes the summary row settings. * Property type: any */ get onRender(): any; set onRender(value: any); /** Sets the grid's state settings. * Property type: any */ get onLoad(): any; set onLoad(value: any); /** Describes the selection settings. * Property type: {(event: KeyboardEvent): void} */ get onKey(): { (event: KeyboardEvent): void; }; set onKey(value: { (event: KeyboardEvent): void; }); /** Describes sorting settings. * Property type: {(index: number, row: GridRow): void} */ get onRowInit(): { (index: number, row: GridRow): void; }; set onRowInit(value: { (index: number, row: GridRow): void; }); /** Sets the grid users. Expects an array with 'id', 'name' and optionally 'color' and 'image' properties. * Property type: {(index: number, row: GridRow, details: HTMLElement): void} */ get onRowDetailInit(): { (index: number, row: GridRow, details: HTMLElement): void; }; set onRowDetailInit(value: { (index: number, row: GridRow, details: HTMLElement): void; }); /** Sets the grid's image and filter upload settings for the image and attachment columns. * Property type: {(index: number, row: GridRow, details: HTMLElement): void} */ get onRowDetailUpdated(): { (index: number, row: GridRow, details: HTMLElement): void; }; set onRowDetailUpdated(value: { (index: number, row: GridRow, details: HTMLElement): void; }); /** Sets the current data view. The possible values are 'grid', 'kanban' and 'card'. * Property type: {(index: number, row: GridRow, history: any[]): void} */ get onRowHistory(): { (index: number, row: GridRow, history: any[]): void; }; set onRowHistory(value: { (index: number, row: GridRow, history: any[]): void; }); /** undefined * Property type: {(index: number, row: GridRow, history: any[]): void} */ get onRowStyle(): { (index: number, row: GridRow, history: any[]): void; }; set onRowStyle(value: { (index: number, row: GridRow, history: any[]): void; }); /** undefined * Property type: {(index: number[], row: GridRow[]): void} */ get onRowInserted(): { (index: number[], row: GridRow[]): void; }; set onRowInserted(value: { (index: number[], row: GridRow[]): void; }); /** undefined * Property type: {(indexes: number[], rows: GridRow[]): void} */ get onRowRemoved(): { (indexes: number[], rows: GridRow[]): void; }; set onRowRemoved(value: { (indexes: number[], rows: GridRow[]): void; }); /** undefined * Property type: {(index: number[], row: GridRow[], oldValues: any[], values: any[], confirm: {(commit: boolean): void}): void} */ 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; }); /** undefined * Property type: {(index: number[], row: GridRow[]): void} */ get onRowUpdated(): { (index: number[], row: GridRow[]): void; }; set onRowUpdated(value: { (index: number[], row: GridRow[]): void; }); /** undefined * Property type: {(index: number, data: any, row: GridRow[]): void} */ get onRowClass(): { (index: number, data: any, row: GridRow[]): void; }; set onRowClass(value: { (index: number, data: any, row: GridRow[]): void; }); /** undefined * Property type: {(index: number, dataField: string, cellValue: any, data: any, row: GridRow[]): void} */ 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; }); /** undefined * Property type: {(index: number, column: GridColumn): void} */ get onColumnInit(): { (index: number, column: GridColumn): void; }; set onColumnInit(value: { (index: number, column: GridColumn): void; }); /** undefined * Property type: {(index: number, column: GridColumn): void} */ get onColumnInserted(): { (index: number, column: GridColumn): void; }; set onColumnInserted(value: { (index: number, column: GridColumn): void; }); /** undefined * Property type: {(index: number, column: GridColumn): void} */ get onColumnRemoved(): { (index: number, column: GridColumn): void; }; set onColumnRemoved(value: { (index: number, column: GridColumn): void; }); /** undefined * Property type: {(index: number, column: GridColumn): void} */ get onColumnUpdated(): { (index: number, column: GridColumn): void; }; set onColumnUpdated(value: { (index: number, column: GridColumn): void; }); /** undefined * Property type: {(dataField: string, cloneColumnDataField: string, index: number, duplicateCells: boolean): void} */ get onColumnClone(): { (dataField: string, cloneColumnDataField: string, index: number, duplicateCells: boolean): void; }; set onColumnClone(value: { (dataField: string, cloneColumnDataField: string, index: number, duplicateCells: boolean): void; }); /** undefined * Property type: {(name: string, command: any, details: GridCell, event: Event | KeyboardEvent | PointerEvent, handled: boolean): void} */ 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; }); /** undefined * Property type: GridPaging */ get paging(): GridPaging; set paging(value: GridPaging); /** undefined * Property type: GridPager */ get pager(): GridPager; set pager(value: GridPager); /** undefined * Property type: GridRowDetail */ get rowDetail(): GridRowDetail; set rowDetail(value: GridRowDetail); /** undefined * Property type: any */ get rowCSSRules(): any; set rowCSSRules(value: any); /** undefined * Property type: boolean */ get rightToLeft(): boolean; set rightToLeft(value: boolean); /** undefined * Property type: GridRow[] */ get rows(): GridRow[]; set rows(value: GridRow[]); /** undefined * Property type: Scrolling | string */ get scrolling(): Scrolling | string; set scrolling(value: Scrolling | string); /** undefined * Property type: GridSummaryRow */ get summaryRow(): GridSummaryRow; set summaryRow(value: GridSummaryRow); /** undefined * Property type: GridStateSettings */ get stateSettings(): GridStateSettings; set stateSettings(value: GridStateSettings); /** undefined * Property type: GridSelection */ get selection(): GridSelection; set selection(value: GridSelection); /** undefined * Property type: GridSorting */ get sorting(): GridSorting; set sorting(value: GridSorting); /** undefined * Property type: any[] */ get users(): any[]; set users(value: any[]); /** undefined * Property type: GridUploadSettings */ get uploadSettings(): GridUploadSettings; set uploadSettings(value: GridUploadSettings); /** undefined * Property type: string */ get view(): string; set view(value: string); get properties(): string[]; /** 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?: ((event?: Event) => void) | undefined; /** 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?: ((event?: Event) => void) | undefined; /** 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?: ((event?: Event) => void) | undefined; /** 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?: ((event?: Event) => void) | undefined; /** 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?: ((event?: Event) => void) | undefined; /** 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?: ((event?: Event) => void) | undefined; /** 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?: ((event?: Event) => void) | undefined; /** 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?: ((event?: Event) => void) | undefined; /** 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?: ((event?: Event) => void) | undefined; /** 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?: ((event?: Event) => void) | undefined; /** 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?: ((event?: Event) => void) | undefined; /** 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?: ((event?: Event) => void) | undefined; /** 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?: ((event?: Event) => void) | undefined; /** 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?: ((event?: Event) => void) | undefined; /** 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?: ((event?: Event) => void) | undefined; /** 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?: ((event?: Event) => void) | undefined; /** 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?: ((event?: Event) => void) | undefined; /** 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?: ((event?: Event) => void) | undefined; /** 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?: ((event?: Event) => void) | undefined; /** 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?: ((event?: Event) => void) | undefined; /** 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?: ((event?: Event) => void) | undefined; /** 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?: ((event?: Event) => void) | undefined; /** 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?: ((event?: Event) => void) | undefined; /** 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?: ((event?: Event) => void) | undefined; /** 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?: ((event?: Event) => void) | undefined; /** 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?: ((event?: Event) => void) | undefined; /** 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?: ((event?: Event) => void) | undefined; /** 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?: ((event?: Event) => void) | undefined; /** 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', '&lt;= 3 and &gt;= 8']], [['firstName', 'EQUAL' 'Andrew' or 'EQUAL' 'Antoni' or 'EQUAL' 'Beate']], [['lastName','CONTAINS' 'burke' or 'CONTAINS' 'peterson']]. Filter conditions used in the filter expressions: '=', 'EQUAL','&lt;&gt;', 'NOT_EQUAL', '!=', '&lt;', 'LESS_THAN','&gt;', 'GREATER_THAN', '&lt;=', 'LESS_THAN_OR_EQUAL', '&gt;=', 'GREATER_THAN_OR_EQUAL','starts with', 'STARTS_WITH','ends with', 'ENDS_WITH', '', 'EMPTY', 'CONTAINS','DOES_NOT_CONTAIN', 'NULL','NOT_NULL' */ onFilter?: ((event?: Event) => void) | undefined; /** 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?: ((event?: Event) => void) | undefined; /** 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?: ((event?: Event) => void) | undefined; /** 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?: ((event?: Event) => void) | undefined; /** This event is triggered, when the grid is resized. * @param event. The custom event. */ onResize?: ((event?: Event) => void) | undefined; /** 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?: ((event?: Event) => void) | undefined; /** 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?: ((event?: Event) => void) | undefined; /** This event is triggered, when the user changes the pages. * @param event. The custom event. */ onPage?: ((event?: Event) => void) | undefined; /** 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?: ((event?: Event) => void) | undefined; /** This event is triggered, when the user reaches the bottom of the grid. * @param event. The custom event. */ onScrollBottomReached?: ((event?: Event) => void) | undefined; /** This event is triggered, when the user reaches the top of the grid. * @param event. The custom event. */ onScrollTopReached?: ((event?: Event) => void) | undefined; /** This event occurs, when the React component is created. * @param event. The custom event. */ onCreate?: ((event?: Event) => void) | undefined; /** This event occurs, when the React component is completely rendered. * @param event. The custom event. */ onReady?: ((event?: Event) => void) | undefined; get eventListeners(): string[]; /** 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; /** 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?: string): any; /** Adds a new column. * @param {any} column. A Grid column object. See 'columns' property. * @returns {boolean} */ addNewColumn(column: any): any; /** 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: number, position?: string): any; /** 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', '&lt;= 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', '&lt;= 3 and &gt;= 8']. Filter conditions which you can use in the expressions: '=', 'EQUAL','&lt;&gt;', 'NOT_EQUAL', '!=', '&lt;', 'LESS_THAN','&gt;', 'GREATER_THAN', '&lt;=', 'LESS_THAN_OR_EQUAL', '&gt;=', '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; /** 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; /** 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; /** Auto-sizes grid rows. This method will update the height of all Grid rows. */ autoSizeRows(): void; /** Auto-sizes grid columns. This method will update the width of all Grid columns. */ autoSizeColumns(): void; /** 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; /** This method returns true, if all rows in the Grid are selected. * @returns {boolean} */ areAllRowsSelected(): any; /** Starts an update operation. This is appropriate when calling multiple methods or set multiple properties at once. */ beginUpdate(): void; /** 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 Gr