Detecting a Formula Value change

2 posts, 0 answers
  1. Rod
    Rod avatar
    17 posts
    Member since:
    Jul 2014

    Posted 19 Aug 2014 Link to this post

    How can one detect when the value of a formula has changed within the radspreadsheet control?

    I have a cell that is a formula  ="Anothercell*4"

    I have the spreadsheet.ActiveWorksheet.Cells.CellPropertyChanged event wired,

    BUT the cellPropertyChangedEvent only fires ONCE when the "anothercell" cell is changed (property = 'CellValue')

    Shouldn't the event fire twice?  Once for AnotherCell and again for the formula cell (with a e.Property value of something other than CellValue?

    thanks
  2. Nikolay Demirev
    Admin
    Nikolay Demirev avatar
    103 posts

    Posted 20 Aug 2014 Link to this post

    Hello,

    The CellPropertyChanged event is raised only when some value in the data structures holding all spreadsheet values changes. When you modify a value in a cell that is referred by a formula actually the data stored in the cell holding the formula stays unmodified. Only the result value of the formula is invalidated and is calculated the next time the result value is accessed. That is why CellPropertyChanged event is not raised for the cell containing the formula.

    I have attached a sample project showing how to track if a CellFormulaValue is invalidated.

    I hope this helps. If you have any further questions, please do not hesitate to contact us again.

    Regards,
    Nikolay Demirev
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top