We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How to Save Formulas

Thread ID:





28900 May 12,2005 05:25 AM May 13,2005 09:16 AM Windows Forms 8
Tags: GridControl
Asked On May 12, 2005 05:25 AM

Hi I am using gridControl to act as Ms-Excel.I have define GridFormulaCellModel for the grid.The Formulas are working fine.But When i save and close the document and reopen the same document,the formulas defined are not working properly.Its showing the formula correctly but its not giving the results.So How to get activate the formulas after closing the document. I am using SaveBinary and LoadBinary Methods to save and load the Grid data. Please help. Regards, Jitendra.

Administrator [Syncfusion]
Replied On May 12, 2005 06:04 AM

After doing LoadBinary to read teh grid back in, try calling engine.RecalculateRange, passing in GridRangeInfo.table() and also setting the other parameters to force the recalculations.

Replied On May 12, 2005 07:55 AM

Hi Clay, Thanks for the support.Its working fine now.I have another issue to discuss.In this application I have Insert Menu like in Excel.I have done "Insering Rows" by gridControl.Model.Rows.InsertRange() and "Inserting Columns" by gridControl.Model.Cols.InsertRange() methods. But how to implement "Insert Cells" functionality.Is it possible to do that? Regards, Jitendra.

Administrator [Syncfusion]
Replied On May 13, 2005 07:07 AM

You could try to do this. For example, if you want to shift the cells down, you would have to copy the cells in the current column from the row you are on to the botton of the grid. You can use the this.gridControl1.CutPaste.CopyCellsToClipboard method to do this. Then you would blank out the current cell, move the currentcell down one cell, and use this.gridControl1.CutPaste.Paste to paste the copied range 1 cell lower.

Replied On May 13, 2005 07:46 AM

Hi Caly, this.gridControl1.CutPaste.CopyCellsToClipboard method expects GridRangeInfoList as arguement.How to give that GridRangeInfoList.In my case the range is from current column data from current row. shall i give like: this.gridControl1.Selections.GetSelectedCols(true, true); Please help Regards, Jitendra.

Replied On May 13, 2005 07:59 AM

I am not able to get the cells in the current column from the current row to the bottom of the grid.How to get that range? Thanks, Jitendra

Administrator [Syncfusion]
Replied On May 13, 2005 08:45 AM

Try this code: int currentRowIndex = grid.CurrentCell.RowIndex; int currentColIndex = grid.Currentcell.ColIndex; int bottomRowIndex = grid.RowCount; GridRangeInfo range = GridRangeInfo.Cells(currentRowIndex, currentColIndex, bottomRowIndex, currentColIndex);

Administrator [Syncfusion]
Replied On May 13, 2005 08:47 AM

Then create a GridRangeInfoList using: GridRangeInfoList list = new GridrangeInforList(); list.Add(range);

Replied On May 13, 2005 09:16 AM

This Works fine. Thanks Clay.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.