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
4695
ultragrid column format -- Truncate
posted

Dear all,

I have below statement, how to make the number to be truncate to be 1 decimal places.

this.ultragrid1.displaylayout.bands[0].columns["CASH"].Format="#,##0.00"

1.22 --> 1.2

1.26 --> 1.2, not 1.3??

Parents
No Data
Reply
  • 3707
    posted

    rchiu5hk said:

    Dear all,

    I have below statement, how to make the number to be truncate to be 1 decimal places.

    this.ultragrid1.displaylayout.bands[0].columns["CASH"].Format="#,##0.00"

    1.22 --> 1.2

    1.26 --> 1.2, not 1.3??

    Give the code I typed out below a shot.

    this.ultraGrid1.DisplayLayout.Bands[0].Columns["CASH"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Currency;
    this.ultraGrid1.DisplayLayout.Bands[0].Columns["CASH"].MaskDisplayMode = MaskMode.IncludeLiterals;
    this.ultraGrid1.DisplayLayout.Bands[0].Columns["CASH"].FormatInfo = System.Globalization.CultureInfo.CurrentCulture;

     

Children
No Data