下面是我的代码,老是不能在DataGridView中显示数据,请看看是什么问题
DataTable dt = new DataTable();
dt.Columns.Add("RegionNumber");
dt.Columns.Add("RegionDescription");
DataRow newRow = dt.NewRow();
newRow[0] = "1";
newRow[1] = "测试区域";
dt.Rows.Add(newRow);
dataGridView_RegionList.DataSource = dt;
DataTable dt = new DataTable();
dt.Columns.Add("RegionNumber");
dt.Columns.Add("RegionDescription");
DataRow newRow = dt.NewRow();
newRow[0] = "1";
newRow[1] = "测试区域";
dt.Rows.Add(newRow);
dataGridView_RegionList.DataSource = dt;
this.fFileIDDataGridViewTextBoxColumn.DataPropertyName = "fFileID";
this.fFileIDDataGridViewTextBoxColumn.HeaderText = "fFileID";
this.fFileIDDataGridViewTextBoxColumn.Name = "fFileIDDataGridViewTextBoxColumn";