I use Visual Basic 2008
I use Datagridview with column "verkoopprijs"
I want comma instead of decimalpoint
My problem is this

25.25 to fill column as decimal point in column "verkoopprijs" the system automatically adjusted to € 2,525.00. This is not okay
25,25 as fill in column with comma in column "verkoopprijs: the system automatically adjusted to € 25,25. This okay

See Appendix


I want always dat de decimal point is replace with comma!


This I have so far, but what now

Dim Europe As NumberFormatInfo = New CultureInfo("en-US", False).NumberFormat
 Europe.NumberDecimalSeparator = ","
Me.Datagridview1.Columns("inkoopprijs").DefaultCellStyle.Format = "c"

But this could also be the solution.
This I have so far, but what now

Private Sub Cell_KeyDown(ByVal sender As Object, ByVal e As KeyEventArgs)
        If (e.Key = Key.Decimal) Then
        End If
    End Sub

What is the best solution and the codes which I still miss?

I didn't deal with decimals, but check the datagrid 's properties and check for formats.

sorry i look for it, can not find a answer.

try "f2" , or "n2" instead of "c"

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.