仅输入数据表WPF中的数字

时间:2015-10-05 12:08:40

标签: c# wpf datatable

我有一个数据表,如何制作,所以用户只能输入数据行数据?

DataColumn column;
            DataRow row;

            column = new DataColumn();
            column.DataType = System.Type.GetType("System.String");
            column.ColumnName = "Типы";
            column.ReadOnly = true;

1 个答案:

答案 0 :(得分:0)

 DataTable myTable = new DataTable();
 myTable.Columns.Add("numericColumn", typeof(Int32)); // for integer column
 myTable.Columns.Add("CharColumn", typeof(char)); // for character column
 myTable.Columns.Add("DecimalColumn", typeof(Decimal)); // for Decimal column