cut/paste/undo/delete functionality for my grid control

Hi,

I am trying a cut/paste/undo/delete functionality for my grid control. This is a winforms application

Could you pls tell me what events to write. This one should also work if the user presses Ctr+x.
Some sample code will be grt

Thanks
Sc



1 Reply

JP Jeya Preetha M Syncfusion Team April 24, 2012 09:15 AM UTC

Hi Thomas,

Thanks for your interest in Syncfusion Products.

To perform cut/paste/undo/delete functionality, please make use of "CurrentCellKeyDown" event.

this.gridControl1.CurrentCellKeyDown += new KeyEventHandler(gridControl1_CurrentCellKeyDown);

void gridControl1_CurrentCellKeyDown(object sender, KeyEventArgs e)
{
//Ctrl+x

if (e.KeyCode == Keys.X && e.Control)
{
//Code here.
e.Handled = true;
}
}
To perform operation, when you press Ctrl+x, Ctrl+v, Ctrl+z, Ctrl+v please set "Keycode" and “e.handled=true”.

Please let me know if you have any concerns.

Regards,
Jeya Preetha M



Loader.
Up arrow icon