Try this code.. you need to override WndProc in your own custom datagrid
control. Hope this helps.
protected override void WndProc(ref Message m)
{
IDataObject clipData = Clipboard.GetDataObject();
bool ctrlDown = false;
bool shiftDown = false;
bool handledMessage = false; // used to decide if call to base WndProc
needed.
switch ( m.Msg )
{
case 0x0100 :
{
if((int)m.WParam == 0x0011)
{
ctrlDown = true;
break;
}
if((int)m.WParam == 0x0010)
{
shiftDown = true;
break;
}
if((ctrlDown == true) && ((int)m.WParam == 0x0056))
{
handledMessage = PerformPaste();
break;
}
if((shiftDown == true) && ((int)m.WParam == 0x002D))
{
handledMessage = PerformPaste();
break;
}
}
break;
case 0x0101 :
{
if((int)m.WParam == 0x0011)
{
ctrlDown = false;
break;
}
if((int)m.WParam == 0x0010)
{
shiftDown = false;
break;
}
}
break;
case 0x0302 :
{
handledMessage = PerformPaste();
}
break;
}
if(handledMessage == true)
{
m.Result = new IntPtr( 0 );
}
else
{
base.WndProc(ref m);
}
}
private bool PerformPaste()
{
//custom past operation implementated by user
}

Signature
Regards,
Sanjeevakumar Hiremath
Proteans Software Solutions
http://sharpnet.blogspot.com
> If any one knows how to implement functionality to copy(ctrl+c) an
> existing
[quoted text clipped - 6 lines]
>
> Thanks