Hi,
I have a datagridview, with NumericUpDown column, I want to use arrow up/down to move from next row or previous row, but it will update the value instead. How do I do it correctly?
Thanks.
Hi Glenn,
the fix is available in Wisej development build 2.2.33.
Best regards
Frank
Hi, how can I set SelectOnEnter property to true, this property is not accessible from code? But I can see it through properties when in design mode. I want a behaviour when cell enters in edit mode, it will automatically select all text so that user can just type in a new value, right now, when it enters in edit mode, the cursor is in the right most part, and I cannot use arrow left to move to the left, I have to use the mouse and it’s time consuming for the user to navigate.
Hi Glenn,
We also logged an issue with the InterceptArrowKey property. When it’s disabled it also disabled editing the NumericUpDown control with the keyboard. The issue is fixed and will be available in the next build.
Sorry for the inconvenience.
Best,
Levie
Hi Glenn,
The InterceptArrowKeys property is what you’re looking for.
You can disable it in the EditingControlShowing event (cast e.Control to a Wisej.Web.NumericUpDown control):
private void dataGridView1_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e) { var control = (NumericUpDown)e.Control; control.InterceptArrowKeys = false; }
You can also create a custom NumericUpDown control and set it to be the Column’s Editor control:
this.dataGridView1.Columns[0].Editor = this.myNumericUpDownControl;
When you set the editor control for a column, the event handlers and properties are applied to each cell editor in that column.
To handle the Arrow key events, you’ll want to add a handler for the KeyDown or KeyUp event of the NumericUpDown control.
Please let me know if this doesn’t work for you!
Best,
Levie
Please login first to submit.