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.

Intercepting Ctrl-C in a datagrid

Thread ID:

Created:

Updated:

Platform:

Replies:

26274 Mar 17,2005 10:24 PM Apr 14,2005 07:20 AM Windows Forms 2
loading
Tags: FAQ
simon
Asked On March 17, 2005 10:24 PM

I have a grid with a boolean and a text field I have a problem in that when I have done ''Select(n)'' to select a row and i press Ctrl-C i get the text for the whole row My clipboard ends up like this: true This is the text I want it to just copy the text from one cell. In other words I want to interept Ctrl-C but cannot figure it out. I''ve tried overriding some of the key events etc. but cant quite get it working. the system ctrl-c takes precedence! how can i intercept it

ramnadh
Replied On March 28, 2005 01:03 AM

Hi, Override the ProcessCmdKey(ref Message msg,Keys keydata) in the custom grid you are developing and catch the event Ctrl + C by writing the code if(keyData == (Keys.Control | Keys.C)){ //Do processing as you need and return //true } after writing the logic which you want in the Ctrl + C block return it to true, so the system Ctrl + C won''t be handled. Regards, Ramnadh. >I have a grid with a boolean and a text field > >I have a problem in that when I have done ''Select(n)'' to select a row and i press Ctrl-C i get the text for the whole row > >My clipboard ends up like this: > >true This is the text > >I want it to just copy the text from one cell. In other words I want to interept Ctrl-C but cannot figure it out. > >I''ve tried overriding some of the key events etc. but cant quite get it working. the system ctrl-c takes precedence! > >how can i intercept it

Administrator [Syncfusion]
Replied On April 14, 2005 07:20 AM

>I have a grid with a boolean and a text field > >I have a problem in that when I have done ''Select(n)'' to select a row and i press Ctrl-C i get the text for the whole row > >My clipboard ends up like this: > >true This is the text > >I want it to just copy the text from one cell. In other words I want to interept Ctrl-C but cannot figure it out. > >I''ve tried overriding some of the key events etc. but cant quite get it working. the system ctrl-c takes precedence! > >how can i intercept it

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.

;