I want to temporarily disable the arrow keys in the grid. When a row is selected, I do some image processing for that row, which typically takes .25 to 2 seconds. During that processing time, I want to disable the arrow keys during processing and then enable them when done. I created a bool isBusy Flag for the processing, but I cannot add that to the below custom behavior. Any suggestions? Is there a way to toggle the Custom behavior?
public class CustomGridBehavior : BaseGridBehavior
{
public override bool ProcessKey(KeyEventArgs keys__1)
{
switch (keys__1.KeyCode)
{
case Keys.Up:
case Keys.Down:
case Keys.Left:
case Keys.Right:
{
return false;
}
default:
{
return base.ProcessKey(keys__1);
}
}
}
}