Hello,
I have several kendo react grids, for which columns maybe resized and/or reordered. I have one question and one issue.
Let starts by the issue. As soon as I click (and release) the resize handler (without moving the mouse), the whole grid is resized. To illustrate this, the attached picture "before_resize" is taken before resizing and the attached picture "after_resize" is taken after a left mouse click and mouse up (no mouse move between).
And now, the question. I would like to memorize the size and the order of all columns, save it into some file and later restore the order and size of all columns. I think I can handle the two first items, but how could I reorder and resize by code the columns ?
Grid is defined by:
<Grid
data={
this
.state.data}
cellRender={
this
.renderers.cellRender}
rowRender={
this
.renderers.rowRender}
editField=
"inEdit"
selectedField=
"selected"
onSelectionChange={
this
.selectionChange}
onHeaderSelectionChange={
this
.headerSelectionChange}
onItemChange={
this
.itemChange}
onColumnResize={(e) => {
if
(e.end) console.log(e); }}
onColumnReorder={(e) => { console.log(e); }}
onRowClick={
this
.rowClick}
reorderable
resizable
scrollable=
"none"
>
While columns are defined by the following code, where width is undefined:
{
this
.state.columns.map((column, idx) =>
column.show && (
<Column
key={idx}
field={column.field}
title={column.title}
filter={column.filter}
cell={column.cell}
editable={column.editable}
editor={column.editor}
width={column.width}
columnMenu={
props =>
(
<CustomColumnMenu
{...props}
columns={
this
.state.columns}
onColumnsSubmit={
this
.onColumnsSubmit}
/>
)
}
/>
)
)}
I am trying to make a large grid perform adequately while scrolling. The grid is 40 columns with a page size of 50. Thirty-five of the columns are always editable.
Is there documentation on the understood limits on the performance of the kendo grid? I do not want to waste time trying to get the performance up if my scenario is significantly outside of the guidelines.
While profiling the grid, I also noticed that the header row is being rerendered even though none of the props have changed. Same goes for the filter row. Is this an issue in KendoReact or have I screwed something up in my headerCellRender function?
Hi,
I want to extract Date from DateTime field and bind to DatePicker. When I try to do that, it throws error as shown in below and in attached screenshot.
<DatePicker defaultValue={new Date().toLocaleDateString()}
Also wanted to know, Could onchange method on datepicker control return only date but not time?
Regards,
Parag
Hi,
I am having problems with setting mask for MaskedTextBox. My mask is something like this: mask={'Days:999 Hours:99 Minutes:99 Seconds:99'}, but letter 'a' is never rendering.
my code: https://stackblitz.com/edit/react-maskedtextbox?file=index.js
Is there any way to render full text?
Thank you,
Dusan
Hi,
I'm trying to export my grid to excel. I'm dynamically building the columns, but they don't get exported unless I hardcode them.
let columns = [],
columnNames = [];
if
(!
this
.state.gridColumns)
return
;
this
.state.gridColumns.forEach(
(column, index) => {
columns.push(
<ExcelExportColumn key={index} field={column.name} title={column.name}/>
);
columnNames.push(column.name);
}
);
return
(
<ExcelExport
columns={columnNames}
data={
this
.state.gridData}
fileName=
"test.xlsx"
ref={(exporter) => {
this
._exporter = exporter;
}}
>
<button
title=
"Export Excel"
className=
"k-button k-primary"
onClick={
this
.export}
>
Export to Excel
</button>
</ExcelExport>