I'm using a gridview in my C# Winforms project and I need to both perform conditional formatting and fire certain custom actions (such as emailing someone, playing a sound, popping a Desktop Alert, etc) when a condition is met. I've set up a conditional formatting framework which works great...when a condition is met it formats the cell or row differently (for instance, if an Order Totals cell value falls below 20 in a row then it will turn the text red). My problem is trying to perform these custom, non-formatting actions when this condition is met. The only way I've made this work is to use the CellFormatting event and check each cell for the condition(s) after each cell is bound, then perform the action at that time. I would much rather just create a ConditionalFormattingObject (or something similar), apply that to a column, and perform all actions and formatting changes at the same time. Is this possible?
Not sure if it matters, but the datagrid is being bound to a List<> of custom business objects returned from a WCF service.
Not sure if it matters, but the datagrid is being bound to a List<> of custom business objects returned from a WCF service.