Thank's I got an open ticket. I did use the example on how to obtain a collection of my module items.
a) I comented the line which was causing the error
b) It collected double entries (support is helping me)
The double entries are coming from the fact that you are not filtering the collection by Status. You should only get Live items. Actually in the database, there are two records for each item - one Live and one Master and when you use the GetDataItems method, it returns both - the Live and Master items. Here's what filter you should add to your method:
dynamicModuleManager.GetDataItems(releaseType).Where(item => item.Status == ContentLifecycleStatus.Live);
If this Master and Live is standard then it would be nice if the code sample created (which I such a huuuuuugggggghhhh help - thank' s a whole heap) would take this into consideration.
I would never have know that there are two item (live and master)
public void RetrieveCollectionOfQuicklinks()
DynamicModuleManager dynamicModuleManager = DynamicModuleManager.GetManager();
Type quicklinkType = TypeResolutionService.ResolveType("Telerik.Sitefinity.DynamicTypes.Model.Quicklinks.Quicklink");
//THIS LINE CAUSED THE ERROR -> CreateQuicklinkItem(dynamicModuleManager, quicklinkType);
// This is how we get the collection of Quicklink items
var myCollection = dynamicModuleManager.GetDataItems(quicklinkType);
// At this point myCollection contains the items from type quicklinkType
RadComboBox1.DataSource = myCollection;
Thank's a lot