Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
40
Cell Formatting - underlying datasource change
posted

Hello, please excuse me if this has been covered in the forums already.

Previously I was using ConditionalFormatting with a MS DataGrid. I want to achieve a similar effect with the Ultragrid.

I have a large grid that looks a bit like a spreadsheet. there is no user input. The values in the cells change automatically in response to changes in the underlying datasource.

If a cell value falls outside a certain range, I want to highlight the cell to the operator in Red.

Would I be correct in using the InitializeRow event and then looping through all my columns to see if any of the cells were outside the threshold. (There are multiple columns containing simialr data)

Is there a more efficient way of doing this? Is there something like an initializeCell event that would be raised in response to an individual cell change due to an underlying data source change?

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    roborchiston said:
    Would I be correct in using the InitializeRow event and then looping through all my columns to see if any of the cells were outside the threshold.

    Yes, that's a good way to do it.

    roborchiston said:
    Is there a more efficient way of doing this? Is there something like an initializeCell event that would be raised in response to an individual cell change due to an underlying data source change?

    No, only InitializeRow.

    If you are concerned about the performance of using InitializeRow, then I recommend that you check out the WinGrid Performance Guide. There is some specific advice there about how to use the InitializeRow event with appearances most efficiently.

Children
No Data