const data = () => [
{
key: "1",
item_one: "Item_One One",
item_two: "Item_Two Two",
item_three: 5,
item_four_one: "Item_Four_One 1",
item_four_two: "Item_Four_Two 2",
item_four_three: "Item_Four_Three 1",
selected: false
},
{
key: "2",
item_one: "Item_One One",
item_two: "Item_Two Three",
item_three: 6,
item_four_one: "Item_Four_One 1",
item_four_two: "Item_Four_Two 2",
item_four_three: "Item_Four_Three 1",
selected: false
},
{
key: "3",
item_one: "Item_One Two",
item_two: "Item_Two Five",
item_three: 1,
item_four_one: "Item_Four_One 1",
item_four_two: "Item_Four_Two 2",
item_four_three: "Item_Four_Three 1",
selected: false
},
{
key: "4",
item_one: "Item_One Two",
item_two: "Item_Two Three",
item_three: 6,
item_four_one: "Item_Four_One 1",
item_four_two: "Item_Four_Two 2",
item_four_three: "Item_Four_Three 1",
selected: false
}
];
const columns = (): Column[] => [
{
field: "item_one",
title: "Item One",
filterType: "text",
},
{
field: "item_two",
title: "Item Two",
filterType: "text",
},
{
field: "item_three",
title: "Item Three",
filterType: "numeric",
},
{
field: "item_four",
title: "Item Four",
children: [
{
field: "item_four_one",
title: "Item Four One"
},
{
field: "item_four_two",
title: "Item Four Two",
},
{
field: "item_four_three",
title: "Item Four three",
}
]
},
];
const groups = [
{field: "item_one", aggregates: [{ field: "item_three", aggregate: "sum" }] },
{field: "item_two", aggregates: [{ field: "item_three", aggregate: "sum" }] }
];
const groupRenderer = (aggregates, field) => {
const aggregate = aggregates.item_three.sum;
if (field === "item_three") {
return(aggregate && <> Total Item Three: {aggregate} </>)
}
return null;
}
const excelReportColumns = columns.map((column) => {
return {
field: column.field,
title: column.title,
children: column.children,
groupHeader: (props: ExcelExportGroupHeaderProps) => groupRenderer(props.aggregates, props.field),
} as ExcelExportColumnProps;
}
return (
<ExcelExport
{...restExcelExportProps}
creator={author}
data={process(data, { sort: sortDesc, filter: filterDesc, group: groups }).data}
ref={excelExporter}
columns={excelReportColumns}
group={groups}
>
</ExcelExport>
)
const excelReportColumns = columns.map((column) => {
return {
field: column.field,
title: column.title,
children: column.children,
groupFooter: (props: ExcelExportGroupFooterProps) => groupRenderer(props.aggregates, props.field),
} as ExcelExportColumnProps;
}
export interface ExcelExportColumnProps extends ColumnBase {
/**
* The options of the column data cells.
*/
cellOptions?: CellOptions;
/**
* The field to which the column is bound.
*/
field?: string;
/**
* The options of the column footer cell.
*/
footerCellOptions?: CellOptions;
/**
* The column footer. Can be a function or a React component.
*/
footer?: Function | ExcelExportFooter;
/**
* The options of the column group footer cells.
*/
groupFooterCellOptions?: CellOptions;
/**
* The header of the group. Can be a function or a React component.
*/
groupHeader?: Function | ExcelExportGroupHeader;
/**
* The footer of the group. Can be a function or a React component.
*/
groupHeader?: Function | ExcelExportGroupFooter;
/**
* The options of the column group header cells.
*/
groupHeaderCellOptions?: CellOptions;
}
I have a grid where the columns don't align properly with the header of the grid and also the grid unnecessarily has a horizontal scrollbar where it's not needed.
1)How can I make the scrollbar appear when there are more columns and not when there are one or two columns?
2)How to make the alignment in sync ?
I am using Kendo React UI framework for Front End development. Can anyone help as how to arrange file structure when it comes to complex project?
We're using KendoReact components but finding the animations distracting - how can we disable them by default?
In jQuery kendo there was kendo.effects.disable()
is there anything like that for KendoReact?
Hello! I am trying to add drop down support to my Kendo React Spreadsheet element. I am following this set of docs but the result does not seem to be working when tested using the most recent React component.
Not working example - https://codesandbox.io/s/fervent-driscoll-2mwf49?file=/app/main.tsx
Working but not using react - http://dojo.telerik.com/IgiFEwEN
Any help would be greatly appreciated!
Hi.
I have setup an example app with a Splitter component that devides the screen between a TreeView and a DataGrid component and setup a drag&drop scenario wher I am able to drag grid rows into the tree to add tree branches.
https://stackblitz.com/edit/vitejs-vite-k3wgr5?file=src%2FApp.tsx
If I want to use the drag handles in the Datagrid to drag a grid row onto the TreeView, the row vanishes under the left side of the Splitter window but I want to keep it visible when I drag it over the tree. I already had a similar issue a while ago and tried to use the same solution but it doesn't seem to work.
Can you help me out and show me how to keep the row visible while dragging it over the tree on the left?
Thanks,
Greetings,
Bernd
I am using a Kendo Drawer, and I am facing two issues. Firstly, when I place a
<DrawerContent>{props.children}</DrawerContent>
component and have children inside it, the content doesn't scroll properly. Secondly, I'm unsure how to consistently display a footer on all pages when using a Kendo Drawer.