Intercepting Ctrl-C in a datagrid

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

2 Replies

RA ramnadh March 28, 2005 06:03 AM UTC

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


AD Administrator Syncfusion Team April 14, 2005 11:20 AM UTC

>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

Loader.
Up arrow icon