Documentation
🔁 Event Callbacks
onSortComplete(e, sortColumns, sortedData, sortOrder)
Triggered after sorting completes.
e
: Event objectsortColumns
: Array of sorted column keyssortedData
: The sorted data arraysortOrder
:'asc'
or'desc'
onSearchComplete(e, query, columns, result, matchCount)
Fired after search operation finishes.
e
: Event objectquery
: Search stringcolumns
: Columns searchedresult
: Filtered rowsmatchCount
: Number of matches
onPageChange(e, currentPage, previousPage, currentPageRows, currentPageFirstRow)
Fired when pagination changes.
e
: Event objectcurrentPage
: Current active page numberpreviousPage
: Previous active page numbercurrentPageRows
: Number of rows on current pagecurrentPageFirstRow
: Index of first row on current page
onDownloadComplete(e, filename, blob)
Triggered after CSV file download. Useful for logging or triggering post-download workflows.
e
: Event objectfilename
: Name of the downloaded fileblob
: Blob object of the file
onColumnResized(e, newWidth, columnName)
— Supported in v1.1.0
and above
This event handler is called after a column has been resized. This function allows you to respond to column resize events, such as updating UI elements or saving user preferences.
e
— The original event object from the resize action.newWidth
— The new width of the column in pixels as a string withpx
suffix (e.g.,"150px"
). If the new width isnull
or invalid, it defaults to0
.columnName
— The unique identifier (name) of the resized column.gridID
— The unique identifier (id) for the DataGrid component.
Row-Level Action Events
editButtonEvent(e, row)
Triggered when the Edit button in a row is clicked. Use this to open edit forms or modals tied to specific row data.
e
: Click event objectrow
: Data object representing the clicked row
deleteButtonEvent(e, row)
Fired when the Delete button in a row is clicked. Typically used to confirm and process row deletions.
e
: Click eventrow
: The row data being deleted
onRowClick(e, row)
Called when any part of a row (not a specific button) is clicked. Useful for row-level selection, navigation, or detailed views.
e
: Click eventrow
: The full row data
onRowHover(e, row)
Triggered when the mouse hovers over a row. Ideal for showing tooltips, highlights, or preview actions.
e
: Mouse eventrow
: Row under the cursor
onRowOut(e, row)
Fired when the mouse leaves a row area. Often used to reset styles or hide tooltips.
e
: Mouse eventrow
: Row from which the cursor exited