PercentCellType should always show two decimal places

Posted by: hpmx on 8 September 2017, 2:10 pm EST

  • Posted 8 September 2017, 2:10 pm EST

    Hi,

    if the percentage is an integer value the cell displays for example 80% but it should display 80.00%.

    Which properties have I to set to reach the desired display format  ?

     

    Thanks in advance

     

    hpm

     

     

  • Replied 8 September 2017, 2:10 pm EST

    Hello,


    While setting the PercentCellType you need to set the FixedPoint property to true to dispaly the integer value in cell as required.


    Code Snippet for the same is :



    FarPoint.Win.Spread.CellType.PercentCellType percent = new FarPoint.Win.Spread.CellType.PercentCellType();
    percent.DecimalPlaces = 2;
    percent.FixedPoint = true;
    fpSpread1.ActiveSheet.Columns[0].CellType = percent;


    Hope this will help. Thanks.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels