Skip to main content

How to: Iterate through items that belong to a specific category

The following sample code removes all links to the items displayed in the “Custom” category.

if (barManager1.Categories.IndexOf("Custom") != -1)
   for (int i = 0; i < barManager1.Categories["Custom"].GetItemCount(); i++)
      barManager1.Categories["Custom"].GetItem(i).Links.Clear();