Is it possible to have copy functionality for selectable cells with row overrides

2 Answers 23 Views
Grid
Jonathon
Top achievements
Rank 1
Iron
Jonathon asked on 18 Jun 2025, 06:04 PM

I have built a component in stackblitz
https://stackblitz.com/edit/react-sjktqaua?file=app%2Fapp.tsx,app%2Fgd-products.ts

Notably it has both the props needed for ctrl+c functionality:

data={data}
        dataItemKey={DATA_ITEM_KEY}
        select={select}
        selectable={{
          enabled: true,
          mode: 'single',
          cell: true,
          drag: false,
        }}
        navigatable={true}
        clipboard={true}
        onClipboard={handleClipboard}
        onSelectionChange={onSelectionChange}

 

 

and a row override:

const CustomRow = (propsGridCustomRowProps=> {
    const available = !props.dataItem.Discontinued;
    const noBgr = { backgroundColor: '' };
    const customBgr = { backgroundColor: 'lavender'fontWeight: 'bold' };
    return (
      <tr {...props.trProps} style={available ? noBgr : customBgr}>
        {props.children}
      </tr>
    );
  };


rows={data: CustomRow }}


This breaks the ctrl+C event. It no longer fires when custom row is applied to the grid. Am I missing anything? I am passing trProps

Jonathon
Top achievements
Rank 1
Iron
commented on 18 Jun 2025, 06:12 PM

also worth noting if you comment out the rows prop it does work again

2 Answers, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 20 Jun 2025, 05:18 PM

Hi, Jonathon,

Thanks a lot for bringing this issue tо our attention. I manage to reproduce it and can confirm that it is related to a bug in the Grid. I have logged it in our bugs backlog, you can track its progress here:

In addition, I have also updated yourTelerik points accordingly as a small token of gratitude for your report.

Please, accept our apologies for the inconveniences caused by this bug.

Regards,
Vessy
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

0
Jonathon
Top achievements
Rank 1
Iron
answered on 30 Jun 2025, 03:22 PM
Moving the custom cell definition out of the Grid fixed this issue

Ehs9ta5x (duplicated) - StackBlitz
Vessy
Telerik team
commented on 01 Jul 2025, 06:42 AM

Thanks a lot for the update, Jonathon, we are glad the suggested in the issue solution resolved the issue at your end as well!
Tags
Grid
Asked by
Jonathon
Top achievements
Rank 1
Iron
Answers by
Vessy
Telerik team
Jonathon
Top achievements
Rank 1
Iron
Share this question
or