回复 3楼hptj的帖子
测试代码如下:
- private void seToolStripMenuItem_Click(object sender, EventArgs e)
- {
- this.fpSpread1_Sheet1.AddSelection(0, 0, 500, 20);
- CellRange cr = this.fpSpread1_Sheet1.GetSelection(0);
- int rowcount = cr.RowCount;
- int colcount = cr.ColumnCount;
-
- FarPoint.Win.Spread.CellType.NumberCellType nbct = new FarPoint.Win.Spread.CellType.NumberCellType();
- nbct.EnableSubEditor=true;
- nbct.DropDownButton = true;
- this.fpSpread1.SuspendLayout();
- for (int i = 0; i < rowcount; i++)
- {
- for (int j = 0; j < colcount; j++)
- {
- this.fpSpread1_Sheet1.Cells[i, j].CellType = nbct;
- }
- }
- this.fpSpread1.ResumeLayout();
- }
复制代码
SuspendLayout、ResumeLayout方法组合使用,用于实现一次性重绘 Spread UI。
没有发现明显卡顿现象,我想您这边应该是应用场景更加的复杂,能否提供个 Demo用于重现问题? |