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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Formula cell not updating

Thread ID:

Created:

Updated:

Platform:

Replies:

28026 Apr 21,2005 07:56 PM UTC Apr 22,2005 01:04 PM UTC WinForms 2
loading
Tags: GridControl
Philip Bishop
Asked On April 21, 2005 07:56 PM UTC

In the sample i''ve attached, the first col you can enter data and the other 3 grayed out cols you cant beacause those update based on the data in col1. if you change like 3 cells in col 1 and make them all 50. swipe all 3 in a range and do a ctrl-c. then click somewhere below it and do a ctrl-v. notice pastes in 3 cells of 50 and updates col 2,3,4. we are also trying to do copy one to many on this form. so if u close the app and start over. change one cell to 50. do a ctrl-c on it and then click the select a range of like 3 cells in col 1 to do a ctrl-v on. notice it pastes in the 3 50''s but it doesnt update the formula cell in col 2,3,4. Is this because copy and paste does it one at a time and im trying to dump it all at once? If so i would of thought the refresh of the grid i do would solve that problem. Any ideas. I have a work around for it by not using the data value in the paste function and instead using the grdname.cellvalue and then it works. The only problem with this is on some other forms that are a lot bigger its really slowing usint the .cellvalue vs the data method of loading. I will email the sample also. Thanks

Administrator [Syncfusion]
Replied On April 21, 2005 09:42 PM UTC

This behavior is expected. Directly updating the GridData object bypasses the events that the GridFormulaEngine listens to to handle updating the formulas depending upon the changed cells. You could call RecalculateRange after your loop to tell the grid to recompute the formulas. Dim engine As GridFormulaEngine = CType(Me.grdCB_CCpSI.CellModels("FormulaCell"), GridFormulaCellModel).Engine engine.RecalculateRange(GridRangeInfo.Table()) But unless you can somehow reduce size of the range you pass in (maybe because you know exactly where the affected formulas will be and only pass in that range), then just updating data using the indexers so the events are raised so the formulaengine can do the updating for you may be more efficient.

Administrator [Syncfusion]
Replied On April 22, 2005 01:04 PM UTC

Thats the exact code we came up with that you gave me. We just wanted to make sure it was suppose to work like that. Thanks for the help

CONFIRMATION

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.

Warning Icon 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.Close Icon

;