Vulnerability in EPiServer.Forms
If I update the Items list in a ContentArea from code, then when I use the FilteredItems to get the items, the FilteredItems won't be updated.
Should it be in this way? Is there a way to update the FilteredItems after I updated the Items list?
Hi! Is your ContentArea writable or read only? If it's read only then changes to the Items collection is ignored which means the StringFragmentCollection (Fragments property which is used in FilteredItems) is not updated.
Thanks Mattias for you response!
The property for the ContentArea IsReadOnly is false.
When I debug it seems that all lists, Content, FilteredContents etc have the "old" value. It's only the Items-list that have the updated value.
I found a solution. Not a pretty one...
Instead of update an item in the Items-list, I remove the old and insert the updated item into the list. Then all other lists will be updated.
That's how we usually do it. I don't remember the details but it didn't work properly by settings IsModified = true either