要即时格式化,恐怕只能在KeyPress事件中加判断,
比如输入的数超过12时,可以认为是日期,自动转换为:new DateTime(DateTime.Today.Year,DataTime.Today.Month,Convert.ToInt32(this.DataGrid1[this.DataGrid.CurrentCell]));
比如输入的数超过12时,可以认为是日期,自动转换为:new DateTime(DateTime.Today.Year,DataTime.Today.Month,Convert.ToInt32(this.DataGrid1[this.DataGrid.CurrentCell]));
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货