Hi albin ps,
I had a similar issue in my Mendix 10.24.1 app. In my datagrid I used a textbox and was not able to use the arrow keys to navigate through the text.
To fix this is realy simpel: Open the settings of the column where your TextBox (or TextArea) is located in and in the "Column capabilities" tab set the option "Allow row events" to "No".
This instantly fixed the problem for me and the arrow keys were working again. Please keep in mind this option is only available when the column content is set to "Custom Content", but this should be anyway the case when you are using a textbox inside this column.
Hi albin ps
This is a known limitation of how Data Grid 2 handles keyboard input. In DG2, the arrow keys are reserved for grid-level keyboard navigation. Because inline in-cell editing is not a first‑class feature in DG2 (unlike the legacy Data Grid 1), the grid’s React keyboard handler “wins,” so ←/→ (and often ↑/↓) move focus across cells/rows instead of moving the caret inside your textbox.
you can place your text box or text area in custom content in DG2 widget and click the column to navigate to column capabilities and turn off the allow row events. click my screenshot.
I hope this helps
Hi,
You are not doing anything wrong here. What you are seeing is actually related to how Data Grid 2 handles keyboard navigation in Mendix.
Data Grid 2 implements its own keyboard navigation (for accessibility and grid navigation), and the arrow keys are captured by the grid itself before they reach the input control. That is why the focus jumps to the next column/row instead of moving the caret inside the textbox. Because this happens inside the React component that implements the grid, intercepting the key events with a JavaScript action usually does not work reliably.
In other words, when inline editing is enabled, Data Grid 2 still prioritizes grid navigation over text-cursor navigation, which is why the arrow keys behave this way.
At the moment there is no supported configuration in Data Grid 2 to change this behavior. The usual workarounds are:
So in short, this is a limitation of Data Grid 2’s keyboard handling rather than an issue in your implementation. If caret movement inside inline editors is critical for your use case, it is worth raising it in the Mendix Ideas portal or checking release notes, as improvements to Data Grid 2 keyboard behavior occasionally appear in newer versions.