Dirty status for formatting changes

Posted by: adisa.craig on 7 May 2019, 11:09 am EST

  • Posted 7 May 2019, 11:09 am EST

    Currently the getDirtyRows or getDirtyCells returns content if the actual data in the cell has changed. However if a formatting change has occurred ie bold or italic the changed cell does not get included in the dirty count.

    Is there a way for me to register those as cell changes as well?

  • Posted 8 May 2019, 2:13 am EST

    Hi,

    As part of the design behaviour, cells are marked dirty only based on their value and not the styles. If you want to track changes to the styles of a cell then you need to maintain a separate record for it explicitly.

    Regards

  • Posted 26 February 2021, 9:35 am EST

    Hi,

    I want to know how can we achieve this and know any formatting done to cell.

  • Posted 1 March 2021, 12:44 am EST

    Hi Shailly,

    You may use CellChanged event for the required functionality. Please refer to the following code snippet and let us know if you face any issues.

    
     sheet.bind(GC.Spread.Sheets.Events.CellChanged, (e, args) => {
        if (args.propertyName === "[styleinfo]") {
          console.log("style Changed of cell ", args.row, args.col);
        }
      });
    
    

    API References:

    CellChanged: https://www.grapecity.com/spreadjs/docs/v14/online/SpreadJS~GC.Spread.Sheets.Events~CellChanged_EV.html

    Regards

    Avinash

  • Posted 19 September 2024, 9:53 am EST - Updated 19 September 2024, 10:20 am EST

    This event does not fire when only formatting has changed though. Is there an an event that can be observed that will fire when the user clicks, for example, the Bold button in the designer to bold the text in a cell?

    This seems to do the trick: https://developer.mescius.com/forums/spreadjs/how-can-fire-event-after-the-user-change-the-fonts-on-the-ribon-menu

  • Posted 19 September 2024, 10:43 pm EST

    Hi,

    Yes, the Cell Changed Event is not triggered when the style such as font, bold is changed from the Designer’s Ribbon. Instead of the Cell Changed, you could use the solution mentioned in the forum case: https://developer.mescius.com/forums/spreadjs/how-can-fire-event-after-the-user-change-the-fonts-on-the-ribon-menu

    Let us know if you face any issues.

    Regards,

    Ankit

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels