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.NumberGroupSeparatorDim 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
Of cours, the NumberGroupSeparator in French is space. I try in Deutch where it's a dot '.' and I got a system runtime exception.
I follow your advise and it works.
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.