Hi. I have a Question to Ask for Infragistics Teamers .
I am using UltraWingrid V10.1 version i want to come true . Ctrl + C is Copy Ctrl + V is Paste these Function In My Code. I Write Belows :
void U8GridImport_KeyDown(object sender, KeyEventArgs e){ switch (e.KeyCode) { case Keys.C : //this code how i Add keys.Control ???? { this.U8GridImport.PerformAction(UltraGridAction.Copy);
} break; case Keys.V: { this.U8GridImport.PerformAction(UltraGridAction.Paste);
} break; default: break; }
}
But There is Nothing to do.
So . Can you Give me some samples about these. that i want function.
Hi, I am Sorry , That Make you Misunderstand.
My Means Is That .. When I Write these Code,
void U8GridImport_KeyDown(object sender, KeyEventArgs e){switch (e.KeyCode){case Keys.C : //this code how i Add keys.Control ????{this.U8GridImport.PerformAction(UltraGridAction.Copy);
}break;case Keys.V:{this.U8GridImport.PerformAction(UltraGridAction.Paste);
}break;default:break;}
And In My Grid. I Use " Ctrl + C" keyBorads Not Come True Copy Fuction..
So I need Your help . Why It Not Come True
Thanks Very Much.
Jian
Hi Jian,
Are you saying that the PerformAction code is being hit and nothing is being copied? If that's the case, then that could be because you did not set the AllowMultiCellOperation property. PerformAction is used to simulate a user action, so I'm not sure if it will work when the properties of the grid do not allow that action.
But again - if you are setting AllowMultiCellOperation, you don't need to handle any key events. The grid will respond to Ctrl+C, Ctrl+V, and Ctrl+X automatically.
If the line of code is not being hit, then where is is failing? I notice that you are not checking the event args to see if the Ctrl key is down. So it looks like this code will fire if you just push C or V without holding Ctrl.