When I have a business collection bound to a grid a little red exclamation point automatically shows up next to the property if it has a broken rule with an error severity. When I set the severity to warning it shows nothing. Does anyone have a fix/workaround for this? I really need to be able to show warning next to the item in the grid.
Thanks,
Jon
Unfortunately you must remember that the Microsoft grid (and data binding in general) only understands the concept of an error. They have no concept of warning/info messages.
So you have to address this in your UI code in some manner - by creating a custom control, using a third party control that can understand the concept, or something along that line.
Okay. Thanks for the help. I'm actually suprised that the datagridview doesn't offer any more help in this area.
Jon
You can set the ErrorText on a cell and it will act just like a real error. Handle the CellEndEdit event and then loop through the BrokenRulesCollection you can then find your warnings and set the Cells[index].ErrorText. The error icon will show in the cell not in the row header like a real error, but it gives you the needed feedback.
Doug
Copyright (c) Marimer LLC