Try our conversational search powered by Generative AI!

FilteredItems from a ContentArea

Vote:
 

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?

Thanks!

// Andreas

#113706
Nov 26, 2014 18:09
Vote:
 

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.

#113733
Nov 27, 2014 9:29
Vote:
 

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

#113894
Dec 01, 2014 12:56
Vote:
 

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.

#113903
Dec 01, 2014 13:55
Vote:
 

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

#113906
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.