Get Categories
Not applicable
04-17-2020
06:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
HI Guys im trying to get a list of category similar to visibility graphics options as shown in the image
but for some reason im get extra items. How do i filter them?
foreach (Category cat in _doc.Settings.Categories)
{
categories.Add(cat);
}
foreach(Category category in categories)
{
if (category.CategoryType == CategoryType.Model)
{
TreeNode treeNode = new TreeNode(category.Name);
foreach (Category sub in category.SubCategories)
{
{
treeNode.Nodes.Add(sub.Name);
}
}
treeView1.Nodes.Add(treeNode);
}
}
Link copied