Replies: 1 comment
-
|
This sounds like a bug to me. I'm surprised that there's not an existing check in Can you file this as a bug issue please? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
We have business use cases where list contents are editable, but the list items are fixed. This is accomplished by setting
AllowNew = false;andAllowRemove= false;in the relevant create methods. However, a call toAddNew()successfully returns a new item that is added to the collection.I was able to confirm this behavior with the following test added to the
CollectionTestsfixture, which testsBindingListBase.The test reaches the
Assert.Fail()line. A similar test inBasicModernTestshas the same behavior with theBusinessListBase.Should the framework be checking the property, or should it be the responsibility of the developer to override the relevant methods to actively prevent new items from being added to the list?
Beta Was this translation helpful? Give feedback.
All reactions