Posted 8 September 2017, 2:26 pm ESTI 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?
PercentCellType hide percent symbol
Posted by: darcy_rainey on 8 September 2017, 2:26 pm EST
Replied 8 September 2017, 2:26 pm EST
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();
o = "200";
prctcell.PositiveFormat = FarPoint.Win.Spread.CellType.PercentPositiveFormat.PercentBefore;
prctcell.PercentSign = " ";
fpSpread1.ActiveSheet.Columns.CellType = prctcell;
fpSpread1.ActiveSheet.Cells[0, 0].Value = o;
Hope this will help you. Thanks.
Replied 8 September 2017, 2:26 pm ESTThanks Reeva, that works perfectly.