C# form has a datagridview. I need to trap an event when CTRL+UP Arrow or CTRL+Down Arrow is pressed in a cell in edit mode.
Not sure which event to handle and how it should be handled.
C# form has a datagridview. I need to trap an event when CTRL+UP Arrow or CTRL+Down Arrow is pressed in a cell in edit mode.
Not sure which event to handle and how it should be handled.
Copyright © 2021 Jogjafile Inc.
Handle the
KeyUpevent for yourDataGridViewlike this :Adding the print screen i get when i actually run the code:
From MSDN:
https://msdn.microsoft.com/en-us/library/2a723cdk%28v=vs.140%29.aspx
https://msdn.microsoft.com/en-us/library/sbf85k1c%28v=vs.140%29.aspx
Because both operands are
boolin my code,&&is the preferred option, although i tested with&and it worked as well. Also&&is more efficient because it tests the second operand only if necessary.