This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I have a list of entities which I display in an UltraWinGrid. All is fine except I need to display some custom errors, i.e. if Arrival Date is less than Departure Date. The UltraGrid uses the standard IDataErrorInfo interface which works well with Binding Lists of entities for simple checks, i.e. missing value, string is empty etc. But I need to do something more elaborate, as per my example above. I tried to simply add a Error to the Entity Errors collection, but it seems this is not possible. So my question, is there a way to manually log an error against an entity? Or is it possible to hand code a constraint as above, so it automatically logs the error? |
|
|
For custom validation you can override OnValidate and then implement your own validation checks. Use Errors.AddError to add an error within that method. There is a basic example described here: http://www.mindscapehq.com/documentation/lightspeed/Creating-Domain-Models/Validation
|
|