Interface EventBus

Event Bus is used to communicate between the grid and the outside world.

Hierarchy

  • EventBus

Properties

onAllColumnsUnPinned?: (() => void)

Type declaration

    • (): void
    • onAllColumnsUnPinned is called when all columns are unlocked. The user can unlock all columns by clicking on the column menu and selecting the unlock all option.

      Returns void

onAllFilterValuesCleared?: (() => void)

Type declaration

    • (): void
    • onFilterValueCleared is called when a filter value is cleared. The user can clear a filter value by using the filter panel or the filter row.

      Returns void

onApiContextReady?: ((wrapper: ApiContext) => void)

Type declaration

    • (wrapper: ApiContext): void
    • onApiContextReady is called when the api context is ready. The api context contains the api and the context. You can use the api to call the api methods. You can use the context to get the grid context. Please search the sample code at https://github.com/flexicious/euxdt-example/search?q=onApiContextReady for examples on how to use the api context.

      Parameters

      • wrapper: ApiContext

        the api context. The api context contains the api and the context.

      Returns void

onBuilt?: (() => void)

Type declaration

    • (): void
    • onBuilt is called when the grid is built. Please be careful when using this method. This method is called when the grid is built. If you call any method that changes the grid, it will cause the grid to be rebuilt. This will cause the onBuilt method to be called again. This will cause an infinite loop. Please see https://github.com/flexicious/euxdt-example/blob/main/src/app/examples/custom-toolbar.tsx for an example on how to use this method.

      Returns void

onCellClicked?: ((cell: CellSelelection, trigger?: MouseEvent) => void)

Type declaration

    • (cell: CellSelelection, trigger?: MouseEvent): void
    • onCellClicked is called when a cell is clicked. The user can click on a cell by clicking on the cell.

      Parameters

      • cell: CellSelelection

        the cell selection object. The cell selection object contains the row unique identifier, and the column unique identifier

      • Optional trigger: MouseEvent

        the mouse event that triggered the cell click.

      Returns void

onCellDoubleClicked?: ((cell: CellSelelection, trigger?: MouseEvent) => void)

Type declaration

    • (cell: CellSelelection, trigger?: MouseEvent): void
    • onCellDoubleClicked is called when a cell is double clicked. The user can double click on a cell by double clicking on the cell.

      Parameters

      • cell: CellSelelection

        the cell selection object. The cell selection object contains the row unique identifier, and the column unique identifier

      • Optional trigger: MouseEvent

        the mouse event that triggered the cell double click.

      Returns void

onCellFocusChanged?: ((selection: CellSelelection, trigger?: MouseEvent) => void)

Type declaration

    • (selection: CellSelelection, trigger?: MouseEvent): void
    • onCellFocusChanged is called when the cell focus changes. Focus change happens when the user clicks on a cell or uses the keyboard to navigate to a cell. This is only called when the grid.enableFocusCellHighlight is set to true.

      Parameters

      • selection: CellSelelection

        the current selection. This is a cell selection object. A cell selection has the row and column unique identifiers.

      • Optional trigger: MouseEvent

        the mouse event that triggered the focus change.

      Returns void

onCellHighlightChanged?: ((selection: CellSelelection, trigger?: MouseEvent) => void)

Type declaration

    • (selection: CellSelelection, trigger?: MouseEvent): void
    • onCellHighlightChanged is called when the cell highlight changes. Highlight change happens when the user hovers over a cell. This is only called when the grid.enableActiveCellHighlight is set to true.

      Parameters

      • selection: CellSelelection

        the current selection. This is a cell selection object. A cell selection has the row and column unique identifiers.

      • Optional trigger: MouseEvent

        the mouse event that triggered the highlight change.

      Returns void

onCellMouseDown?: ((cell: CellSelelection, trigger?: MouseEvent) => void)

Type declaration

    • (cell: CellSelelection, trigger?: MouseEvent): void
    • onCellMouseDown

      Parameters

      • cell: CellSelelection

        the cell selection object. The cell selection object contains the row unique identifier, and the column unique identifier

      • Optional trigger: MouseEvent

        the mouse event that triggered the cell mouse down.

      Returns void

onCellMouseOut?: ((cell: CellSelelection, trigger?: MouseEvent) => void)

Type declaration

    • (cell: CellSelelection, trigger?: MouseEvent): void
    • onCellMouseOut is called when user moves the mouse out of a cell.

      Parameters

      • cell: CellSelelection

        the cell selection object. The cell selection object contains the row unique identifier, and the column unique identifier

      • Optional trigger: MouseEvent

      Returns void

onCellMouseOver?: ((cell: CellSelelection, trigger?: MouseEvent) => void)

Type declaration

    • (cell: CellSelelection, trigger?: MouseEvent): void
    • onCellMouseOver is called when user hovers over a cell.

      Parameters

      • cell: CellSelelection

        the cell selection object. The cell selection object contains the row unique identifier, and the column unique identifier

      • Optional trigger: MouseEvent

      Returns void

onCellMouseUp?: ((cell: CellSelelection, trigger?: MouseEvent) => void)

Type declaration

    • (cell: CellSelelection, trigger?: MouseEvent): void
    • onCellMouseUp

      Parameters

      • cell: CellSelelection

        the cell selection object. The cell selection object contains the row unique identifier, and the column unique identifier

      • Optional trigger: MouseEvent

      Returns void

onCellRightClicked?: ((cell: CellSelelection, trigger?: MouseEvent) => void)

Type declaration

    • (cell: CellSelelection, trigger?: MouseEvent): void
    • onCellRightClicked is called when a cell is right clicked. The user can right click on a cell by right clicking on the cell.

      Parameters

      • cell: CellSelelection

        the cell selection object. The cell selection object contains the row unique identifier, and the column unique identifier

      • Optional trigger: MouseEvent

      Returns void

onCellSelectionChanged?: ((selection: CellSelelection[], trigger?: MouseEvent) => void)

Type declaration

    • (selection: CellSelelection[], trigger?: MouseEvent): void
    • onCellSelectionChanged is called when the cell selection changes. This is only called when the cell selection mode is enabled.

      Parameters

      • selection: CellSelelection[]

        the current selection. This is an array of the cell selections. A cell selection has the row and column unique identifiers.

      • Optional trigger: MouseEvent

        the mouse event that triggered the selection change.

      Returns void

onColumnLockModeChanged?: ((columnUniqueIdentifier: unknown) => void)

Type declaration

    • (columnUniqueIdentifier: unknown): void
    • onColumnLockModeChanged is called when a column is pinned/unlocked. The user can unlock a column by clicking on the column menu and selecting the unlock option. It may also be called when the user drag and drops a column to the left or right of the grid.

      Parameters

      • columnUniqueIdentifier: unknown

        the unique identifier of the column that was unlocked.

      Returns void

onColumnShifted?: ((fromColIdentifier: string, nextoColIdentifier: string) => void)

Type declaration

    • (fromColIdentifier: string, nextoColIdentifier: string): void
    • onColumnShifted is called when a column is shifted. The user can shift a column by dragging the column header and dropping it on another column header.

      Parameters

      • fromColIdentifier: string

        the column unique identifier of the column that is being shifted.

      • nextoColIdentifier: string

        the column unique identifier of the column that the column is being shifted to.

      Returns void

onColumnVisibilityChanged?: ((columnUniqueIdentifier: unknown, visible: boolean) => void)

Type declaration

    • (columnUniqueIdentifier: unknown, visible: boolean): void
    • onColumnVisibilityChanged is called when a column is hidden or shown. The user can hide or show a column by clicking on the column menu and selecting the hide or show option. The user can also hide or show a column by clicking on the Settings menu and selecting the hide or show option.

      Parameters

      • columnUniqueIdentifier: unknown

        the unique identifier of the column that was hidden or shown.

      • visible: boolean

        true if the column is visible, false otherwise.

      Returns void

onContextMenuShown?: ((selection: ContextMenuInfo, trigger?: MouseEvent) => void)

Type declaration

    • (selection: ContextMenuInfo, trigger?: MouseEvent): void
    • onContextMenuShown is called when the context menu is shown.

      Parameters

      • selection: ContextMenuInfo

        This is the cell selection that triggered the context menu. The cellSelection has the row and column unique identifiers.

      • Optional trigger: MouseEvent

        the mouse event that triggered the context menu.

      Returns void

onExpandChanged?: ((expansion: Expansion) => void)

Type declaration

    • (expansion: Expansion): void
    • onExpandChanged is called when a row is expanded or collapsed. The user can expand or collapse a row by clicking on the expand or collapse icon.

      Parameters

      • expansion: Expansion

        the expansion object. The expansion object contains the row unique identifier and the expansion state.

      Returns void

onFilterChanged?: ((filterValues: Map<string, unknown>, globalFilter: string) => void)

Type declaration

    • (filterValues: Map<string, unknown>, globalFilter: string): void
    • onFilterChanged is called when the any of the individual filters or the global filter changes. This is called when the user changes the filter value, clears the filter value using the filter renderers.

      Parameters

      • filterValues: Map<string, unknown>
      • globalFilter: string

      Returns void

onFilterPageSortChanged?: ((args: FilterPageSortArguments) => void)

Type declaration

    • (args: FilterPageSortArguments): void
    • onFilterPageSortChanged is called when the filter, page, or sort changes. This is called when the user changes the filter value, clears the filter value using the filter renderers, changes the page, or changes the sort. This is primarily used for server side paging and sorting, where you need to fetch the data from the server and need to know the filter, page, and sort values to construct the server side query. Please see https://github.com/flexicious/euxdt-example/blob/main/src/app/examples/server-paging.tsx for an example.

      Parameters

      • args: FilterPageSortArguments

        the filter page sort arguments. The filter page sort arguments contains the filter values, the global filter value, the pagination, and the sort info.

      Returns void

onFilterValueChanged?: ((columnUniqueIdentifier: unknown, value: unknown) => void)

Type declaration

    • (columnUniqueIdentifier: unknown, value: unknown): void
    • onFilterValueChanged is called when a filter value changes. The user can change a filter value by using the filter panel or the filter row.

      Parameters

      • columnUniqueIdentifier: unknown

        the unique identifier of the column that was filtered.

      • value: unknown

        the value of the filter. This value depends on the individual column filter renderer. For example, the value of a text filter is a string, the value of a date filter is a date, etc. There are custom filters that support multiple values. For example, the multi-select filter supports an array of values, the range filter supports a range object, etc. Please see DateRange, NumberRange, and MultiSelectFilters for more details.

      Returns void

onGlobalFilterChanged?: ((value: string) => void)

Type declaration

    • (value: string): void
    • onGlobalFilterChanged is called when the global filter changes. The user can change the global filter by using the global filter text box. this is only called when the grid.toolbarOptions.enableGlobalFilter is set to true.

      Parameters

      • value: string

        the value of the global filter.

      Returns void

onGlobalFilterTreeChanged?: ((value: Filter) => void)

Type declaration

    • (value: Filter): void
    • onGlobalFilterTreeChanged is called when the global filter tree changes. The user can change the global filter tree by using the global filter tree. this is only called when the grid.toolbarOptions.enableGlobalFilterTree is set to true.

      Parameters

      • value: Filter

        the value of the global filter tree. The value is a Filter object. Please see the Filter interface for more details.

      Returns void

onGroupingFieldsChanged?: ((groupingFields: string[]) => void)

Type declaration

    • (groupingFields: string[]): void
    • onGroupingFieldsChanged is called when the grouping fields change. The user can change the grouping fields by using the grouping panel. This is only called when the grid.toolbarOptions.enableGroupingDropzone is set to true. Please see https://github.com/flexicious/euxdt-example/blob/main/src/app/examples/grouping-grid.tsx for an example.

      Parameters

      • groupingFields: string[]

        the array of grouping fields. The grouping fields are the column unique identifiers.

      Returns void

onItemLoadRequested?: ((row: RowPositionInfo) => void)

Type declaration

    • (row: RowPositionInfo): void
    • Similar to onFilterPageSortChanged, but this is called when the user expands or collapses a row. This is primarily used for server side loading where you need to fetch the data from the server to get the children of the expanded row. Only applicable when itemLoadMode is set to 'server'. Please see the itemLoadMode property on the GridOptions interface for more details. Please see https://github.com/flexicious/euxdt-example/blob/main/src/app/examples/nested-lazy-load.tsx for an example.

      Parameters

      • row: RowPositionInfo

        the row position info. The row position info contains the row unique identifier and the row index.

      Returns void

onPageChaged?: ((pagination: Pagination) => void)

Type declaration

    • (pagination: Pagination): void
    • onPageChaged is called when the page changes. The user can change the page by clicking on the page navigation buttons.

      Parameters

      • pagination: Pagination

        the pagination object. The pagination object contains the current page, the page size, and the total number of rows.

      Returns void

onQuickFindChanged?: ((value: string) => void)

Type declaration

    • (value: string): void
    • onQuickFindChanged is called when the quick find value changes. The user can change the quick find value by using the quick find text box. this is only called when the grid.toolbarOptions.enableQuickFind is set to true.

      Parameters

      • value: string

        the value of the quick find.

      Returns void

onResized?: ((gridDiv: null | HTMLDivElement, size: Rectangle) => void)

Type declaration

    • (gridDiv: null | HTMLDivElement, size: Rectangle): void
    • onResized is called when the grid is resized. The grid has a resize observer that calls this method when the grid is resized. It is recommended to give the grid a height and width. If you do not give the grid a height and width, the grid will take up the height and width of the parent container. If the parent container is not visible, the grid will not be visible.

      Parameters

      • gridDiv: null | HTMLDivElement

        the grid div element

      • size: Rectangle

      Returns void

onRowSelectionChanged?: ((selection: unknown[], trigger?: MouseEvent) => void)

Type declaration

    • (selection: unknown[], trigger?: MouseEvent): void
    • onRowSelectionChanged is called when the row selection changes. This is only called when the row selection mode is enabled.

      Parameters

      • selection: unknown[]

        the current selection. This is an array of the unique identifiers of the selected rows.

      • Optional trigger: MouseEvent

        the mouse event that triggered the selection change.

      Returns void

onSavingSettings?: ((settings: SettingsData[]) => void)

Type declaration

    • (settings: SettingsData[]): void
    • onSavingSettings is called when the user clicks on the save settings button This is called before the settings are saved. You can use this to modify the settings before they are saved. The settings object contains a customSettings property that you can use to store your custom settings.

      Parameters

      • settings: SettingsData[]

        the array of settings data. The settings data contains the name of the settings, the filter values, the global filter value, the sort info, the grouping fields, and the column order.

      Returns void

onSettingsApplied?: ((settings: SettingsData) => void)

Type declaration

    • (settings: SettingsData): void
    • onSettingsApplied is called when the user clicks on the apply settings button. This is called after the settings are applied. You can use this to do something after the settings are applied. For example,, you can use this to apply settings that you have stored in the customSettings property of the settings data. Please see https://github.com/flexicious/euxdt-example/blob/main/src/app/examples/save-as-you-go.tsx for an example.

      Parameters

      • settings: SettingsData

        the settings data. The settings data contains the name of the settings, the filter values, the global filter value, the sort info, the grouping fields, and the column order.

      Returns void

onSettingsSaved?: ((settings: SettingsData[]) => void)

Type declaration

    • (settings: SettingsData[]): void
    • onSettingsSaved is called when the user clicks on the save settings button. This is called after the settings are saved. You can use this to do something after the settings are saved.

      Parameters

      • settings: SettingsData[]

        the array of settings data. The settings data contains the name of the settings, the filter values, the global filter value, the sort info, the grouping fields, and the column order.

      Returns void

onSortChanged?: ((allSorts: Map<string, SortInfo>, sortInfo?: SortInfo, trigger?: MouseEvent) => void)

Type declaration

    • (allSorts: Map<string, SortInfo>, sortInfo?: SortInfo, trigger?: MouseEvent): void
    • onSortChanged is called when the sort changes. The user can change the sort by clicking on the column header. The grid stores sorts in a map. The key is the column unique identifier and the value is the sort info. The sort info contains the sort direction and the sort priority. The sort priority is the order in which the sort was applied.

      Parameters

      • allSorts: Map<string, SortInfo>

        a map of all the sorts. The key is the column unique identifier and the value is the sort info.

      • Optional sortInfo: SortInfo

        the sort info of the column that was sorted. This is undefined if all the sorts were cleared.

      • Optional trigger: MouseEvent

        the mouse event that triggered the sort change.

      Returns void

Generated using TypeDoc