回复 1楼moriya的帖子
moriya 你好
我不是十分明白你的问题,我使用下面的代码,拖动之后调用AddColumnHeaderSpanCell方法依然有效,能否详细描述以下你的操作步骤和问题:
- private void Form1_Load(object sender, EventArgs e)
- {
- fpSpread1.AllowColumnMove = true;
- fpSpread1.ActiveSheet.RowCount = 10;
- fpSpread1.ActiveSheet.ColumnCount = 10;
- fpSpread1.ActiveSheet.ColumnHeader.RowCount = 2;
- fpSpread1.ActiveSheet.ColumnHeader.Cells[0, 0].Text = "Col1";
- fpSpread1.ActiveSheet.ColumnHeader.Cells[0, 1].Text = "Col1";
- fpSpread1.ActiveSheet.ColumnHeader.Cells[0, 2].Text = "Col1";
- fpSpread1.ActiveSheet.ColumnHeader.Cells[0, 3].Text = "Col1";
- fpSpread1.ActiveSheet.ColumnHeader.Cells[0, 4].Text = "Col2";
- fpSpread1.ActiveSheet.ColumnHeader.Cells[0, 5].Text = "Col2";
- fpSpread1.ActiveSheet.ColumnHeader.Cells[0, 6].Text = "Col2";
- fpSpread1.ActiveSheet.ColumnHeader.Cells[0, 7].Text = "Col2";
- fpSpread1.ActiveSheet.ColumnHeader.Cells[0, 8].Text = "Col3";
- fpSpread1.ActiveSheet.ColumnHeader.Cells[0, 9].Text = "Col3";
- fpSpread1.ActiveSheet.ColumnHeader.Cells[1, 0].Text = "Col10";
- fpSpread1.ActiveSheet.ColumnHeader.Cells[1, 1].Text = "Col11";
- fpSpread1.ActiveSheet.ColumnHeader.Cells[1, 2].Text = "Col12";
- fpSpread1.ActiveSheet.ColumnHeader.Cells[1, 3].Text = "Col13";
- fpSpread1.ActiveSheet.ColumnHeader.Cells[1, 4].Text = "Col14";
- fpSpread1.ActiveSheet.ColumnHeader.Cells[1, 5].Text = "Col15";
- fpSpread1.ActiveSheet.ColumnHeader.Cells[1, 6].Text = "Col16";
- fpSpread1.ActiveSheet.ColumnHeader.Cells[1, 7].Text = "Col17";
- fpSpread1.ActiveSheet.ColumnHeader.Cells[1, 8].Text = "Col18";
- fpSpread1.ActiveSheet.ColumnHeader.Cells[1, 9].Text = "Col19";
- }
- private void addSpanToolStripMenuItem_Click(object sender, EventArgs e)
- {
- fpSpread1.ActiveSheet.AddColumnHeaderSpanCell(0, 0, 1, 4);
- }
复制代码 |