wlp5402 你好,不好意思,久等了。
1. 不好意思,我通过你的你的 Demo 没有重现出问题,在 Demo 中我添加了如下代码,。
- DataTable dataTable = new DataTable();
- DataColumn dataCol1 = new DataColumn("Contact Person(Eng)", typeof(System.String));
- DataColumn dataCol2 = new DataColumn("Contact Person(CN)", typeof(System.String));
- DataColumn dataCol3 = new DataColumn("Position", typeof(System.String));
- DataColumn dataCol4 = new DataColumn("Area Code", typeof(System.String));
- DataColumn dataCol5 = new DataColumn("Tel NO.", typeof(System.String));
- DataColumn dataCol6 = new DataColumn("Mobile NO.", typeof(System.String));
- DataColumn dataCol7 = new DataColumn("Fax NO.", typeof(System.String));
- DataColumn dataCol8 = new DataColumn("Email", typeof(System.String));
- dataTable.Columns.Add(dataCol1);
- dataTable.Columns.Add(dataCol2);
- dataTable.Columns.Add(dataCol3);
- dataTable.Columns.Add(dataCol4);
- dataTable.Columns.Add(dataCol5);
- dataTable.Columns.Add(dataCol6);
- dataTable.Columns.Add(dataCol7);
- dataTable.Columns.Add(dataCol8);
- dataTable.Rows.Add("test", "test", "test", "test", "test", "test" ,"test");
- this.FpSpread1.ActiveSheetView.FrozenRowCount = 2;
- this.FpSpread1.ActiveSheetView.DataSource = dataTable;
- for (int i = 0; i < this.FpSpread1.ActiveSheetView.ColumnCount; i++)
- {
- this.FpSpread1.ActiveSheetView.Columns[i].Width = 120;
- }
- this.FpSpread1.ActiveSheetView.AddColumns(0, 2);
复制代码 仍然没有重现问题,所以,麻烦发个重现问题的 Demo,给你带来不便很抱歉:
截图如下:
有数据:
png
无数据:
png
|