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 

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi,

    I'm not sure I understand the issue. Is the NumberGroupSeparator in French a space? 

    I think if you just create your mask in English and put a "{LOC}" in front of it, it will automatically pick up the system local settings for the separators, so that might work better than trying to create the mask yourself based on current culture.

Children