New to KendoReact? Start a free 30-day trial
GridColumnMenuSort
jsx
const ColumnMenu = (props) => {
return (
<div>
<GridColumnMenuSort {...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>
<div>
<Grid
data={result}
{...dataState}
onDataStateChange={dataStateChange}
sortable={true}
pageable={true}
>
<Column field="ProductID" title="Product ID" columnMenu={ColumnMenu} />
<Column field="ProductName" />
</Grid>
<br />
</div>
</div>
);
};
export default App;
Name | Type | Default | Description |
---|---|---|---|
props |
|
The props of the GridColumnMenuSort component. |