Posted 8 September 2017, 2:00 pm EST
I have lots of textbox and a spread in windows form.
A focus is moved to spread if enter key is pressed in a speicific text
I want to input into the first cell of it rightly without clicking when it has a focus.
In other words I'd don't want to use mouse.
Though I set editmode to true, Messagebox tells 'false'
Following is my code;
private void teRemk_KeyPress(object sender, KeyPressEventArgs e)
if (e.KeyChar == (char)13 && mode == "new")
sprAccinfo.EditMode = true;
// I tried reorder the above lines, but it's useless.
MessageBox.Show(sprAccinfo.EditMode.ToString()); //The output is 'False'
What's wrong in my code?
What shall I do to do this?