We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Copy() in GridStaticCellRenderer

Thread ID:





5165 Jun 23,2003 01:14 PM UTC Jun 23,2003 02:16 PM UTC WinForms 2
Tags: GridControl
Administrator [Syncfusion]
Asked On June 23, 2003 01:14 PM UTC

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

Administrator [Syncfusion]
Replied On 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.

Administrator [Syncfusion]
Replied On 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


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon