您好,
SortRows 排序后单元格无法合并是产品设计。
目前可以通过 SortRange 方法替代:- private void Form2_Load(object sender, EventArgs e)
- {
-
- fpSpread1.ActiveSheet.SetValue(0, 0, "C");
- fpSpread1.ActiveSheet.SetValue(1, 0, "A");
- fpSpread1.ActiveSheet.SetValue(2, 0, "E");
- fpSpread1.ActiveSheet.SetValue(3, 0, "B");
- fpSpread1.ActiveSheet.SetValue(0, 1, "3");
- fpSpread1.ActiveSheet.SetValue(1, 1, "5");
- fpSpread1.ActiveSheet.SetValue(2, 1, "1");
- fpSpread1.ActiveSheet.SetValue(3, 1, "2");
- }
- private void button1_Click(object sender, EventArgs e)
- {
- FarPoint.Win.Spread.SortInfo[] sort = new FarPoint.Win.Spread.SortInfo[1];
- sort[0] = new FarPoint.Win.Spread.SortInfo(0, true, System.Collections.Comparer.Default);
- fpSpread1.ActiveSheet.SortRange(0, 0, 4, 4, true, sort);
- //fpSpread1.ActiveSheet.SortRows(0, 4, sort);
- }
- private void button2_Click(object sender, EventArgs e)
- {
- fpSpread1.ActiveSheet.AddSpanCell(1, 1, 2, 2);
- }
复制代码
希望能够帮助到您。 |