@progress/kendo-angular-grid
Version:
Kendo UI Grid for Angular - high performance data grid with paging, filtering, virtualization, CRUD, and more.
49 lines (48 loc) • 1.6 kB
TypeScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
/**
* Arguments for the [`rowReorder`](slug:api_grid_gridcomponent#toc-rowreorder) event
* ([see example](slug:reordering_rows_grid)).
*/
export interface RowReorderEvent {
/**
* The rows that are currently dragged and the data associated with them.
*/
draggedRows: DragRow[];
/**
* The row over which the dragged rows are dropped.
*/
dropTargetRow?: DragRow;
/**
* The exact dragged row position relative to the position of the drop target row.
*/
dropPosition: DropPosition;
}
/**
* Represents a reorderable data row with an associated data item.
*/
export interface DragRow {
/**
* The row data item.
*/
dataItem: any;
/**
* The data row index.
*/
rowIndex: number;
/**
* The row HTML element.
*/
element: HTMLElement;
}
/**
* Represents the exact dragged row position relative to the position of the drop target row.
*
* The possible values are:
* * `before`—The row will be rendered as previous sibling of the target row.
* * `after`—The row will be rendered as next sibling of the target row.
* * `forbidden`—Dropping the row is not allowed.
*/
export type DropPosition = 'before' | 'after' | 'forbidden';