Implementing fill right/down

Hi,

I need to implement fill right/down functionality similar to Excel. I know how to do the basic fill using gridmodel.ChangeCells. What I don''t know is how to adjust any formulas that are part of the fill. I guess you could just simulate a paste over and over but I''m wondering if there is an easier and more efficient way.

Thanks.

2 Replies

AD Administrator Syncfusion Team September 6, 2006 07:15 AM UTC

Hi Amit,

There are properties that you set to tell the GridFormulaEngine to do the work required to update referecnes as you insert/delete rows/columns or copy/paste formulas. Try setting these properties:

this.gridControl1.TableStyle.CellType = "FormulaCell";

this.engine = ((GridFormulaCellModel)gridControl1.Model.CellModels["FormulaCell"]).Engine;
engine.FormulaCopyFlags |= GridFormulaCopyFlags.InsDelRangeReferencesUpdated;
engine.FormulaCopyFlags |= GridFormulaCopyFlags.ClipBoardReferencesAdjusted;

Please let me know if you need more information.

Regards,
Haneef


AD Administrator Syncfusion Team September 7, 2006 08:45 PM UTC

I know about the gridformula copy flags. They don''t take effect when using ChangeCells. That''s why I was saying that the only way I can see to adjust formulas is to simulate a paste over the whole range you want to fill. This would be very slow and I was wondering if there is a more efficient, syncfusion recommended way.

Thanks.

Loader.
Up arrow icon