如果您说得这个动态的最大值可以在设置页面时候确定,可以使用MaximumValue
- FarPoint.Win.Spread.CellType.CurrencyCellType currcell = new FarPoint.Win.Spread.CellType.CurrencyCellType();
- currcell.CurrencySymbol = "CN$";
- currcell.DecimalPlaces = 4;
- currcell.DecimalSeparator = "#";
- currcell.FixedPoint = true;
- currcell.LeadingZero = FarPoint.Win.Spread.CellType.LeadingZero.Yes;
- currcell.MaximumValue = 999999999999;
- currcell.MinimumValue = 1;
- currcell.NegativeFormat = FarPoint.Win.Spread.CellType.CurrencyNegativeFormat.SignSymbolSpaceBefore;
- currcell.NegativeRed = true;
- currcell.PositiveFormat = FarPoint.Win.Spread.CellType.CurrencyPositiveFormat.CurrencySymbolBefore;
- currcell.Separator = ",";
- currcell.ShowCurrencySymbol = true;
- currcell.ShowSeparator = true;
- fpSpread1.Sheets[0].Cells[5,2].CellType = currcell;
- fpSpread1.Sheets[0].Cells[5,2].Value = 321.98;
复制代码
如果是不停变化的,根据很多情况决定,那么就在提交数据时候再验证,或者在valuechang的事件里判断 |