|
export class ContextMenuSample extends SampleBase {
constructor() {
super(...arguments);
this.groupOptions = { showGroupedColumn: true };
this.contextMenuItems = [
{
text: "Cut",
iconCss: "e-cm-icons e-cut"
}
];
this.editing = { allowDeleting: true, allowEditing: true };
}
render() {
return (
<div className="control-pane">
<div className="control-section">
<GridComponent
id="gridcomp"
dataSource={orderDetails}
allowPaging={true}
allowSorting={true}
allowExcelExport={true}
allowPdfExport={true}
contextMenuItems={this.contextMenuItems}
editSettings={this.editing}>
. . . .
<Inject
services={[
ContextMenu,
]}
/>
</GridComponent>
</div>
</div>
);
}
}
render(<ContextMenuSample />, document.getElementById("sample"));
|
@font-face {
font-family: 'e-context-menu';
. . . . .
font-weight: normal;
font-style: normal;
}
.e-cm-icons {
font-family: 'e-context-menu';
font-style: normal;
font-variant: normal;
font-weight: normal;
line-height: 1;
text-transform: none;
}
/* custom code end */
.e-menu-item .e-cut::before {
content: '\e264';
}
|