将DataGridView添加到PaletteSet上不显示数据
我想将datatable赋给DataGridViDocument doc = Application.DocumentManager.MdiActiveDocument;Database db = doc.Database;
PaletteSet paletteSet = new PaletteSet("宗地信息");
paletteSet.Visible = true;
System.Windows.Forms.Panel panel = new System.Windows.Forms.Panel();
panel.Dock = DockStyle.Fill;
DataGridView dataGridView = new DataGridView();
dataGridView.Dock = DockStyle.Fill;
System.Data.DataTable dt = new System.Data.DataTable();
dt.Columns.Add("宗地号");
DataRow dataRow = dt.NewRow();
dataRow["宗地号"] = "111111111111";
dt.Rows.Add(dataRow);
dataGridView.DataSource = dt;
panel.Controls.Add(dataGridView);
paletteSet.Add("面板", panel);
ew,通过PaletteSet显示出来,但是搞不懂为啥不显示数据,请高手们帮忙看下怎么回事。
页:
[1]