[CLOSED] How to create gridpanel column having a numeric value of lenght more than 19 digits?

  1. #1

    [CLOSED] How to create gridpanel column having a numeric value of lenght more than 19 digits?

    In gridpanel, When choosing a column of type of "int" or "float" and this column have length more than 19 numeric digits it does not show more than 16 digits and the others it put them as zeros.

    I have tried to put the column type to "string" but still have the same issue.

    How can I show the whole number in a column in gridpanel when the number type in sql database is "numeric(38,0)".

    Thanks

    Denis Edde
    Last edited by Daniil; Nov 18, 2014 at 2:07 PM. Reason: [CLOSED]
  2. #2
    Hi Denis,

    JavaScript supports only 17 decimal numbers.

    For example, if you run this "code" in a browser's javaScript console:
    0.111111111111111122
    the last "2" is going to be truncated.

    It is a general restriction of JavaScript and Ext.NET doesn't affect on that.

    So, if you need to show more than 17 decimal numbers, I can recommend to bind a string to the Store, not a number.

    One more fact about JavaScript floating point arithmetic. It is not always accurate. Please try to run:
    0.2 + 0.1
    It results in
    0.30000000000000004
    Just for your information.
  3. #3
    Hi Daniil,

    Great thanks, I didn't know that.

Similar Threads

  1. [CLOSED] Numeric grid Filter, numeric field Decimal Places
    By RCM in forum 2.x Legacy Premium Help
    Replies: 6
    Last Post: Oct 10, 2013, 8:37 PM
  2. Replies: 5
    Last Post: May 16, 2013, 5:39 PM
  3. Replies: 0
    Last Post: Jun 22, 2012, 8:58 AM
  4. numeric column (grid panel)
    By marcmvc in forum 1.x Help
    Replies: 1
    Last Post: Nov 11, 2009, 3:35 PM
  5. Replies: 11
    Last Post: Jun 22, 2009, 4:54 PM

Posting Permissions