请参考一下代码:
- private void fpSpread1_DragFillBlock(object sender, FarPoint.Win.Spread.DragFillBlockEventArgs e)
- {
- e.DataOnly = false;
- }
- private void Form1_Load(object sender, EventArgs e)
- {
- fpSpread1.AllowDragFill = true;
- fpSpread1.AllowUserFormulas = true;
- fpSpread1.Sheets[0].Cells[2, 2].Formula = "C3+D3";
- fpSpread1.DragFillBlock += new FarPoint.Win.Spread.DragFillBlockEventHandler(fpSpread1_DragFillBlock);
- }
复制代码 |