我有一个数据表,如何制作,所以用户只能输入数据行数据?
DataColumn column;
DataRow row;
column = new DataColumn();
column.DataType = System.Type.GetType("System.String");
column.ColumnName = "Типы";
column.ReadOnly = true;
答案 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