I have implemented Selection Aggregates to count content inside cells. For this I use the onSelectionChange prop, passing a selectionChange function that calls getStatusData from '@progress/kendo-react-grid' and stores the result in the statusData state.
Recently I added a requirement to highlight the row when I select a cell in that row, so I decided to use a custom row renderer via the rows prop and pass a row component.
But here’s the problem: as soon as I started using the custom row renderer, the double-click handling that used to work via the Grid's onRowDoubleClick stopped working. I tried handling the double-click directly on the <tr> by attaching an onDoubleClick handler, but that didn't help either.
As far as I can tell, the issue is that when I click a cell, onSelectionChange fires and I update the state with the result of getStatusData (which is necessary for Selection Aggregates). That state update causes my rows to re-render, and the double-click never fires. If I don't use a custom row renderer (which I need for row highlighting), I can attach onSelectionChange on the Grid, update the state on click for Selection Aggregates, and onRowDoubleClick works.
How can I combine Selection Aggregates, row highlighting when selecting a cell (currently implemented with the custom row renderer), and double-click handling?
Link for sandbox: https://codesandbox.io/p/sandbox/keen-andras-kyzf5c
Code:
import * as React from "react";
import {
Grid,
GridColumn as Column,
GridSelectionChangeEvent,
StatusBar,
getStatusData,
StatusItem,
GridCustomRowProps,
} from "@progress/kendo-react-grid";
import sampleProducts from "./gd-sample-products";
const DATA_ITEM_KEY = "ProductID";
const App = () => {
const [statusData, setStatusData] = React.useState<StatusItem[]>([
{ type: "count", formattedValue: "0", value: 0 },
]);
const selectionChange = (event: GridSelectionChangeEvent) => {
console.log("selectionChange single-click");
setStatusData(
getStatusData({
dataItems: sampleProducts,
target: event.target,
select: event.select,
dataItemKey: DATA_ITEM_KEY,
})
);
};
const CustomRow = (props: GridCustomRowProps) => {
// console.log("CustomRow props: ", props);
const available = !props.dataItem.Discontinued;
const noBgr = { backgroundColor: "" };
const customBgr = { backgroundColor: "lavender", fontWeight: "bold" };
return (
<tr
{...props.trProps}
style={available ? noBgr : customBgr}
onDoubleClick={(e) => console.log("CustomRow onDoubleClick e: ", e)}
onClick={(e) => {
console.log("CustomRow single click");
}}
>
{props.children}
</tr>
);
};
return (
<>
<div style={{ padding: "5px", color: "#999" }}>
<div>Ctrl+Click/Enter - add to selection</div>
<div>Shift+Click/Enter - select range </div>
</div>
<Grid
rows={{ data: CustomRow }}
onRowDoubleClick={(e) => console.log("onRowDoubleClick")}
data={sampleProducts}
autoProcessData={true}
dataItemKey={DATA_ITEM_KEY}
reorderable={true}
navigatable={true}
defaultSelect={{
4: [0],
5: [0],
6: [0],
7: [0],
}}
selectable={{ enabled: true, drag: true, cell: true, mode: "multiple" }}
onSelectionChange={selectionChange}
>
<Column title="Products">
<Column field="ProductID" title="Product ID" width="100px" />
<Column field="ProductName" title="Product Name" width="300px" />
<Column field="UnitsInStock" title="Units In Stock" />
<Column field="UnitsOnOrder" title="Units On Order" />
<Column field="ReorderLevel" title="Reorder Level" />
<Column field="Discontinued" title="Discontinued" />
<Column field="FirstOrderedOn" title="Date" format="{0:d}" />
</Column>
<StatusBar data={statusData} />
</Grid>
</>
);
};
export default App;

I am currently utilizing a KendoReact Form with an integrated DropDownList component. However, the selected value cannot be cleared by the user. I have reviewed external documentation, but a clear explanation for implementing this functionality is absent. Could you provide a coding example demonstrating how to implement a clear button on the dropdown within this form structure?
I need to add a clear icon to my dropdown list so that the user can click it to clear the selected value

Hi team,
Working with complex or even slightly nested CompositeFilterDescriptors gets confusing quick, does KendoReact contain any kind of helpers for managing a filter tree, adding, updating or removeing Composite/FilterDescriptors?
My usecase is that i need to build a composite filter desc where filters contaisn a mix of FilterDescriptor and CompositeFilterDescriptor, and im hanving trouble maintianing such an object, hence the question.
eg:
// All search mechanisms are external to the Grid component
// eg: https://www.telerik.com/kendo-react-ui/components/grid/filtering/advanced-filtering#filtering-data-grid-through-external-textbox
{
logic: 'and',
filters: [
// This CompFiltDesc is controlled by a single 'Product Search' box, the goal is to find any record where
// ther code or description contains any of the text, so 'mix chef' and 'checf mix' return the same thing
{
logic: 'or',
filters: [
{ field: 'productItem.description', operator: 'contains', value: 'chef' },
{ field: 'productItem.code', operator: 'contains', value: 'chef' },
{ field: 'productItem.description', operator: 'contains', value: 'mix' },
{ field: 'productItem.code', operator: 'contains', value: 'mix' }
]
},
{
field: 'quantity', operator: 'isnotnull'
},
{
field: 'productItem.attributes', operator: 'contains', value: 'Brand:x'
}
]
}THanks,
Grant
I'd like to be able to render links as a Dimension value where appropriate.
The Dimension display value is defined as
displayValue: (item: any) => string
I can't use a jsx fragment here of if I attempt to return an '< a href....' it is html encoded and rendered as html.
Ideally I'd like to add a <Link component but would settle for an <a tag
Is this achievable?
Hi, I use Popover for showing error messages during validation. First it renders fine, but when I switch tabs(my app has multiple tabs) callout disappears completely. Here's how I use the component:
```ts
<Popover
show={show}
anchor={inputRef.current}
position="bottom"
contentStyle={{ padding: '0.5em', border: 'black' }}
collision={{ horizontal: 'flip', vertical: 'flip' }}
appendTo={container}
>
```Screenshot attached.

Hi,
If GridColumnProps has { hidden: true} in it, then GridColumnState won't be able to override the `hidden` property anymore.
Please see this example:
https://codesandbox.io/p/sandbox/stoic-wildflower-wn4lzn?file=%2Fapp%2Fapp.tsx%3A11%2C10-11%2C25
Line 15, customerID column's hidden is set to true. Clicking the "Hide" button won't show/hide that column. But if change customerID's `hidden` value to `false`, or just remove that hidden property at line 15. The "Hide" button will work.
Thanks,
Jie
