你好,使用 MaskedEditCellType 可以满足该功能,代码如下:
- FarPoint.Web.Spread.Extender.MaskedEditCellType m = new FarPoint.Web.Spread.Extender.MaskedEditCellType();
- m.Editor.BorderWidth = 1;
- m.ShowEditor = true;
- m.MaskType = AjaxControlToolkit.MaskedEditType.Number;
- //其中 9 为占位符,
- m.Mask = "999,999,999.99";
- m.ClearMaskOnLostFocus = true;
- m.InputDirection = AjaxControlToolkit.MaskedEditInputDirection.LeftToRight;
- FpSpread1.ActiveSheetView.Cells[0, 0].CellType = m;
复制代码 |