掩码机制本身没有提供这样的输入限制,只能在程序中来判断最后两位是否符合你的要求
控制日期格式:
- FarPoint.Win.Spread.CellType.DateTimeCellType date = new FarPoint.Win.Spread.CellType.DateTimeCellType();
- date.DateTimeFormat = FarPoint.Win.Spread.CellType.DateTimeFormat.UserDefined;
- date.UserDefinedFormat = "yyyy-MM-dd";
- this.fpSpread1.ActiveSheet.Columns[0].CellType = date;
- this.fpSpread1.ActiveSheet.Cells[0, 0].Value = "2012-01-01";
复制代码 |