Modifying Numeric Pad Decimal Key Behavior
-
Hi all, I've got a bit of a problem here, and maybe the solution is obvious but I cant seem to find it. We are developing a client app that reads a whole lot of numerical data through keyboard input. The main input control is NET's base library DataGrid. This application will have to be localized in different countries which means that the decimal separator might be a comma or a period depending where the application is running. The problem is that .NET's DataGrid will always recognize the numeric keypad decimal key as a period (unlike for example MS Excel, where it will always recongize it as the decimal separator no matter what the current culture info is). This isn't too much of a problem in countries where the decimal separator is a period, but in countries where its a comma, the decimal key in the numericpad is useless, thus lowering the user's keyboard input performance. Is there any way that I can intercept the keyboard event and change the input to a generic CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator string/char? Obviously DataGrid's key events dont work because they dont capture the events when editing a cell and I cant seem to hook up any event to a datagridcell. I've been looking at windows messages and I'm not sure if the same thing is happening...messages in the messageloop of the currentcell are not going through the datagrid control ??? PD Changing OS Culture Info is not a valid solution. any help would be appreciated, and sorry for any spelling mistakes, I'm not english spoken thanks.
-
Hi all, I've got a bit of a problem here, and maybe the solution is obvious but I cant seem to find it. We are developing a client app that reads a whole lot of numerical data through keyboard input. The main input control is NET's base library DataGrid. This application will have to be localized in different countries which means that the decimal separator might be a comma or a period depending where the application is running. The problem is that .NET's DataGrid will always recognize the numeric keypad decimal key as a period (unlike for example MS Excel, where it will always recongize it as the decimal separator no matter what the current culture info is). This isn't too much of a problem in countries where the decimal separator is a period, but in countries where its a comma, the decimal key in the numericpad is useless, thus lowering the user's keyboard input performance. Is there any way that I can intercept the keyboard event and change the input to a generic CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator string/char? Obviously DataGrid's key events dont work because they dont capture the events when editing a cell and I cant seem to hook up any event to a datagridcell. I've been looking at windows messages and I'm not sure if the same thing is happening...messages in the messageloop of the currentcell are not going through the datagrid control ??? PD Changing OS Culture Info is not a valid solution. any help would be appreciated, and sorry for any spelling mistakes, I'm not english spoken thanks.