Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

FilteredItems from a ContentArea


Hi all!

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?


// Andreas

Nov 26, 2014 18:09

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.

Nov 27, 2014 9:29

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.

// Andreas

Dec 01, 2014 12:56

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.

Dec 01, 2014 13:55

That's how we usually do it. I don't remember the details but it didn't work properly by settings IsModified = true either

Dec 01, 2014 14:03
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.