GridColumnMenuGroup
Component
Definition
Package:@progress/kendo-react-grid
Properties Interface:GridColumnMenuGroupProps
Syntax:
jsx
const TextColumnMenu = (props) => {
return (
<div>
<GridColumnMenuSort {...props} />
<GridColumnMenuGroup {...props} />
</div>
);
};
const initialState = {
take: 10,
skip: 0
};
const App = () => {
const [dataState, setDataState] = useState(initialState);
const [result, setResult] = useState(process(products.slice(0), initialState));
const dataStateChange = (event) => {
setDataState(event.dataState);
setResult(process(products.slice(0), event.dataState));
}
return (
<div>
<Grid
data={result}
{...dataState}
onDataStateChange={dataStateChange}
sortable={true}
pageable={true}
>
<Column field="ProductID" title="Product ID" />
<Column field="ProductName" columnMenu={TextColumnMenu} />
</Grid>
<br />
</div>
);
};
export default App;
Properties
The current column options.
group?
GroupDescriptor[]
The current group state of the Grid. It takes value of type GroupDescriptor[]
groupable?
boolean
The groupable option of the column.
onCloseMenu?
Function
The method that will be called to close the column menu.
onGroupChange?
(groups: GroupDescriptor[], event: MouseEvent<HTMLAnchorElement, MouseEvent>) => void
The method that will be called to notify the parent Grid about a group change.
Parameters:groupsGroupDescriptor[]eventMouseEvent<HTMLAnchorElement, MouseEvent>