Overwriting bound cell value

Posted by: bo-jangles on 8 September 2017, 2:32 pm EST

  • Posted 8 September 2017, 2:32 pm EST


    The following is for databound sheet.

    I would like to overwrite cell value and / or formating and use my value instead of the datasource value. For example null values I might want to display as N/A, certain date ranges painted in red etc.

    All I could find in forums is to specify custom cell type and override Paint event. I don't like this idea as I like setting up column properties in the designer and if I have many cells that need custom handling it will result in lots of code to write. I might as well go and populate sheet manually.

    Ideally the spread should fire some sort of event when a cell is populated with the bound value. Inside this event we should be able to replace the value from the data source, change the formating etc. or accept the default handling.

    Simmilar to models.data.changed event except that this one doesn't fire for datasource bound sheet.

    Any suggestions?



  • Replied 8 September 2017, 2:32 pm EST

    Unfortunately there does not appear to be a really simple solution to this. I spoke with the Product Manager regarding your issue and he suggests that your best course of action may be to implement an additional later of code between your Datasource and your Dataset to translate your Datasource to be displayed as you wish and to translate your displayed data back  before updating your datasource.
Need extra support?

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

Learn More

Forum Channels