Validation between elements of BusinessBindingListBase #1829
-
Hi Folks, I have a BusinessBindingListBase and i want to validate that the elements of the list between each other. I must ensure that some values do not overlap between them. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
There are two scenarios:
For option 1 the easiest thing is to implement a rule that checks the list for conflicts, then trigger that rule in the BusinessBase parent by handling the OnChildChanged or ChildChanged event. For option 2 there's no rules engine in list objects, but you can handle the OnChildChanged/ChildChanged event and implement logic to check the list for conflicts. The trick here, is that only the child objects can have any visual aspect (the list itself isn't "visible" via data bnding). So the logic in your list class will need to call something in one or more child objects so those child objects become invalid. |
Beta Was this translation helpful? Give feedback.
There are two scenarios:
For option 1 the easiest thing is to implement a rule that checks the list for conflicts, then trigger that rule in the BusinessBase parent by handling the OnChildChanged or ChildChanged event.
For option 2 there's no rules engine in list objects, but you can handle the OnChildChanged/ChildChanged event and implement logic to check the list for conflicts. The trick here, is that only the child objects can have any visual aspect (the list itself isn't "visible" via data bnding). So the logic in your list class will need to call something in one or more child objects so those child objec…