【发布时间】:2015-10-05 12:08:39
【问题描述】:
我有一个Datatable,如何制作,所以用户只能在Datatable的行中输入数字?
DataColumn column;
DataRow row;
column = new DataColumn();
column.DataType = System.Type.GetType("System.String");
column.ColumnName = "Типы";
column.ReadOnly = true;
【问题讨论】:
-
与您要查找的内容相同,但带有一个文本框:stackoverflow.com/a/463335/5147720
-
你在使用 DataGrid 吗?将 DataGridTemplateColumn 与 CellTemplate 中的 TextBox 一起使用。然后,您可以收听 PreviewKeyPress 事件以拒绝字母按键。
-
cscmh99 谢谢你,我做到了