Hi,
This might be trivial, but for some reason I can't fake the "Control C" keydown of a user. I am merely trying to make a function to do use the built in Copy function of ultragrid, so I thought by calling
KeyDown(
this, new KeyEventArgs(Keys.LButton | Keys.ShiftKey)); -- control key
then followed by
this, new KeyEventArgs(Keys.C)); would be the easiest solution...
I just want to use the built in Copy function, please advise
What exactly "did not work" about it?
I have tried all the below code to trap a Ctrl+C on event keydown of ultrawingrid, but unfortunately it did not work.
Can you tell me what could be the reason?
If
(e.KeyCode = Keys.C And e.Modifiers = Keys.Control) Then
MessageBox.Show("Ctrl-c Pressed")
End If
If e.Control And e.KeyCode = Keys.C Then
If e.Control Then
If e.KeyCode = Keys.C Then
yup thanks!
Hello,
You are able to achieve what you are looking for with following line:
ultraGrid1.PerformAction(Infragistics.Win.UltraWinGrid.UltraGridAction.Copy);
This will copy the data from the selected cells into the clipboard.
Please let me know if this is what you need.
Sincerely,
Danko Valkov
Developer Support Engineer
Infragistics, Inc.
Not really, I am trying to duplicate that "Control + C" pressing as a tool. Like a button that a user would like to click to Copy.