The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hi,
I want to implement cut/copy/paste for all my editable cells. And Copy for my static cells.
Why is the Copy() method in GridStaticCellRenderer not implemented. I can see the reason Cut and paste is not implemented.
thanks,
- Reddy
ADAdministrator Syncfusion Team June 23, 2003 02:11 PM UTC
The Renderer.Copy method is only called if the selection is a single cell (or text within a single cell). For example, in GridTextBoxCellRenderer.Copy, there is code that checks to see if there is selected text in teh cell, and either copies the whole text in the cell or selected text in the cell if there is any.
Now for a Static cell, there is not the case of having partially selected text in the cell, so only the whole text is copied. Thus, there is no special processing required (as is in the TextBox case to check if there is partially selected text). So, there is no need to have this override implemented as the default processing in GridModel.Copy will hanlde this case.
ADAdministrator Syncfusion Team June 23, 2003 02:16 PM UTC
For a static cell there is no selected text. So, it can just fall back to the default grid Copy mechanism which just copies the formatted text of that cell onto the clipboard.
So, instead of GridStaticCellRenderer.Copy handling the copy operation instead GridModel itsself will handle this.
The CopyTextToBuffer will handle this. It is called from GridModelCutPatse.Copy() taking into account any ClipboardFlags that have been set.
Stefan