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
1840
WebNumericEdit add a point-sing to an int value when focus leave
posted

Hi,

i use the WebNumericEdit Control from NetAdvantage 7.2. The allowed user input is a possitive integer, so i set min val to 0 and DataMode to int. If the user input is 1234 and the focus leave the field, it is displayed as 1.234. I don't no why, but it irritate the user. I try to change the property 'NumberFormat.NumberGroupSeperator' to '' (empty string) on Page.Load; with the error that the instance is write-protected.

How can i change the behavior of the controll to not format the integer ?

 

  • 45
    posted

    This will solve the problem: 

     

    Protected Sub txtJaar_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtJaar.Load

    Dim nfi As System.Globalization.NumberFormatInfo

    nfi = New System.Globalization.NumberFormatInfo

    nfi.NumberGroupSeparator = ""

    Me.txtJaar.NumberFormat = nfi

    End Sub

  • 469350
    Verified Answer
    Offline posted

     This is the WinForms forum. Please post your question in the ASP.Net forums.