Regarding the error message which you are getting: "The specified property 'Category' does not exist on type 'Telerik.Sitefinity.DynamicTypes.Model.ModelofType.ModelOfType'"
it seems that there is not a custom field Category
added to your dynamic module. Can you please make sure that you have a category custom field added to your dynamic module?
In addition to this, please note that in order to add categories and tags you can use the extension method SetValue()
Please make sure that you have added the following namespace:
Here is also a sample code which add a certain category titled Cat1
to a selected event item:
EventsManager eventsManager =
// Gets the evnt item
var eventItem = eventsManager.GetEvents().Where(ev => ev.Title ==
// Gets the manager which operates with Taxonomies
TaxonomyManager taxonomyManager = TaxonomyManager.GetManager();
// Get the ID of the singe instance (HierarchicalTaxon) of type Hierarchicaltaxonomy
//(This can be Categories or any custom HierarchicalTaxonomy)
var categoryTaxonomy = taxonomyManager.GetTaxonomies<HierarchicalTaxonomy>().SingleOrDefault(s => s.Name ==
var singleCategoryId = categoryTaxonomy.Taxa.Where(c => c.Title ==
// Get a collection of all the IDs of the categories of the event, if any
var myEventsCategories = eventItem.GetValue<TrackedList<Guid>>(
// add the selected category id to the above collection
// assign the modified collection to the Category metafield of the event item
// this is equivalent to adding a new Category to a event through the UI
You may also checkout the video
for your convenience demonstrating the results on your side.
You can use the same approach for adding categories to your dynamic module items. You can also checkout the following forum thread
and the following forum post
where the same has been discussed.
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal
and vote to affect the priority of the items