Hello all,
we use the UltraTextEditor as the editor controls on string columns in our UltraGrid control. By using this control, we noticed that the Numpad key decimal is not working. If the key decimal on the main keyboard is used, the decimal is is added to the cell. I found out that when the UltraFormattedTextEditor is used as the editor control instead, the numpad key is working. So, the problem is related to the UltraTextEditor. During my analysis I recognized that when I push the numpad key decimal the UltraTextEditor KeyDown event is fired, but not the KeyPress event, which is fired by using every other key on the keyboard - for example, the decimal key on the main keyboard.
KeyDown event of the UltraTextEditor when the numpad key decimal is pressed:
How can I enable the UltraTextEditor to accept also the numpad key decimal '.'?
This is how the UltraTextEditor is created:
new UltraTextEditor() { WordWrap = false, };
Thank you and best regards
Hello Divya,
thank you for providing the sample project. I used it to check the differences between the basic Infragistics and our custom implementation.
This way I could find out that we use a custom event handler for the Grid KeyPress event, that causes the problem. The implementation checks the pressed key whether it is the decimal key of the keyboard numpad. In this case the current fired event is handled, and a new KeyPress event is fired on the grid with the correct char based on the application language (English -> "." and German -> "," for example). Within the UltraFormattedTextEditor this process is working fine but using the UltraTextEditor which uses a separate control to edit the content, the fired KeyPress event of the control is not handled by the editor control and as a result the numpad decimal is not added to the content.
As we found an alternative implementation by manipulating the KeyPressEventArgs this request can be marked as solved.
Thank you for your support.Best regards Rainer
Hello Rainer,
Thank you for your post. In order to understand the issue i set up a demo sample using V23.1 of UltraGrid containing ultraTextEditor as a EditorComponent and when i run the sample and try to edit the cell with decimal value its all working fine.
The ultraTextEditor is accepting the decimal (.) from the keyboard.
I attached my demo sample here , let me know if your scenario and test steps are different . Feel free to modify the sample and send me back reproducing the issue for further investigation.
Thank you.KeySample.zip