Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
180
Maskinput for french number
posted

Hi,

In my application, I deal with different cultures (french, english ...). I must display in my grid numbers depending on the culture of the user. I define my mask like this 

Dim grpNumber As String = My.Application.Culture.NumberFormat.NumberGroupSeparator

Dim maskValue As New StringBuilder("-nn" + grpNumber + "nnn" + grpNumber + "nnn" + grpNumber + "nnn")

 

In english the number group separatior is comma (,) so I have this 99,999,999,999.99 that's good. 

My problem is in french. When I enter the cell, ___ ___ ___ ___,__ is displayed and the caret is not at the lelf of comma (it still at the first space begining at the left.).The cell does not accept more than 4 zeros without moving the cursor to the next thousand separation. With three zeros, if I don't move the cursor and I enter other number, the zero is automaticaly replaced.

Can someone helps?

Thanks