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.
Unfortunately, activation email could not send to your email. Please try again.

Copy() in GridStaticCellRenderer

Thread ID:

Created:

Updated:

Platform:

Replies:

5165 Jun 23,2003 09:14 AM Jun 23,2003 10:16 AM Windows Forms 2
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On June 23, 2003 09:14 AM

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 10:11 AM

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 10:16 AM

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

CONFIRMATION

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.

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.

;