@progress/kendo-react-grid
Version:
KendoReact Grid package
79 lines (78 loc) • 2.29 kB
TypeScript
/// <reference types="react" />
import { GridRowType } from './GridRowType';
/**
* Represents the props of the GridCell component.
*/
export interface GridCellProps {
/**
* The field to which the cell is bound ([see example]({% slug sorting_grid %})).
*/
field?: string;
/**
* The data object that represents the current row.
*/
dataItem: any;
/**
*
*/
dataIndex: number;
/**
* The format that is applied to the value before the value is displayed. Takes the `{0:format}` form where `format` is a standard number format, a custom number format, a standard date format, or a custom date format. For more information on the supported date and number formats, refer to the [kendo-intl](https://github.com/telerik/kendo-intl/blob/develop/docs/index.md) documentation.
*/
format?: string;
/**
* The custom CSS classes of the cells.
*/
className?: string;
/**
* The index of all rendered columns.
*/
columnIndex?: number;
/**
* The number of rendered columns in the Grid.
*/
columnsCount?: number;
/**
* The type of the row.
*/
rowType?: GridRowType;
/**
* @hidden
*/
level?: number;
/**
* The expanded value of the cell when hierarchy or grouping are used.
*/
expanded?: boolean;
/**
* The event that is fired when the cell is selected.
*/
selectionChange?: (event: {
syntheticEvent: React.SyntheticEvent<any>;
}) => void;
/**
* The event that is fired when the cell value is changed.
*/
onChange?: (event: {
dataItem: any;
syntheticEvent: React.SyntheticEvent<any>;
field?: string;
value?: any;
}) => void;
/**
* The type of the editor which will be used when the cell is in edit mode.
*/
editor?: 'text' | 'numeric' | 'boolean' | 'date';
/**
* The method for rendering the cell.
*/
render?: (defaultRendering: React.ReactElement<HTMLTableCellElement> | null, props: GridCellProps) => React.ReactElement<HTMLTableCellElement> | null;
/**
* The styles for the cell
*/
style: React.CSSProperties;
/**
* The column span of the cell.
*/
colSpan?: number;
}