PercentCellType hide percent symbol

Posted by: darcy_rainey on 8 September 2017, 2:26 pm EST

  • Posted 8 September 2017, 2:26 pm EST

    I would like to hide the percent sign in cells with CellType set to PercentCellType. I tried setting the PercentCellType.PercentSign to null and to string.Empty but the "%" still shows. Is there a way to hide the percent sign?
  • Replied 8 September 2017, 2:26 pm EST

    Hello Zigzag,

    You can try setting PercentSign to a space along with setting the PositiveFormat property of the PercentCellType to PercentBefore. Here is the code for the same :-


    FarPoint.Win.Spread.CellType.PercentCellType prctcell = new FarPoint.Win.Spread.CellType.PercentCellType();

    object o;

    o = "200";


    prctcell.PositiveFormat = FarPoint.Win.Spread.CellType.PercentPositiveFormat.PercentBefore;

    prctcell.PercentSign = " ";

    fpSpread1.ActiveSheet.Columns[0].CellType = prctcell;

    fpSpread1.ActiveSheet.Cells[0, 0].Value = o;


    Hope this will help you. Thanks.

  • Replied 8 September 2017, 2:26 pm EST

    Thanks Reeva, that works perfectly.
Need extra support?

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

Learn More

Forum Channels