Hello, Alvaro,
Thank you for the provided clarification. Yes, the official request will be for the Spreadsheet to have fill/paste actions over a selection captured in the command stack and participate in Undo/Redo as a single action.
I have converted this thread to an official feature request.
Regards,
Filip
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.
Hi, Filip.
Ye, the requirement is to replicate the pasted value across all selected cells, without merging. I tested your sample and it works correctly.
Regarding the ticket, the official request would be to have these actions (fill/paste over a selection) captured in the command stack and participate in Undo/Redo as a single action.
If that’s correct, could you please convert this ticket into a feature request?
Best regards, and thanks a lot.
Hi, Alvaro,
Thank you for the provided clarification. I was able to reproduce both issues in the sent example.
Currently the Spreadsheet component does not have a inbuilt way to hook into the command stack so that the required actions are registered properly. For the value selection I was able to replicate it across all cells with the following implementation:
Just to clarify, the requirement is to replicate the pasted value across all selected cells, without merging, correct? However for the copy and pasting I was not able to find a feasible workaround, since there is no exposed mechanism that will allow more control over the copy and paste actions.
I can convert this ticket to an official feature request for having this functionality available out of the box if you would like that.
Regards,
Filip
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.
Hello,
Thank you for your response. I tested the suggested approach, but I’ve found a couple of issues:
Copy/Paste with different selection sizes:
If I copy and paste the same number of columns, it works as expected.
However, if I copy one column and try to paste it into a selection of two columns, only the first column gets the values — the rest of the selection remains unchanged.
Ideally, I would like the values to fill the entire selection (e.g. the single copied column replicated across all selected columns).
Undo/Redo integration:
When I copy and paste using these custom toolbar buttons, the Undo/Redo buttons and the keyboard shortcuts (Ctrl+Z / Ctrl+Y) stop working.
Is there a way to hook into the Spreadsheet’s command stack so that these actions are registered and Undo/Redo works correctly with the custom copy/paste?
Could you please advise if there’s a supported way to handle these cases, or if any workaround is recommended?
Thank you again for your help.
Hello, Alvaro,
The Spreadsheet enables the insertion of custom tools, this approach can be used to add two buttons, one for copying the value and the other for pasting via an attached ref to component. I have prepared a runnable example that showcases this solution here:
Please review the example above and let me know in case this is not exactly what you are looking for and I will gladly assist further. As for making the column width automatically adjust to the content, this is currently not supported. I tried various custom implementations to achieve it, mostly by using CSS, however none of the approaches yielded the desired result.
Regards,
Filip
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.