© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
24 replies
tootall

❔ ObjectListView showing blank rows

Hi all. I'm new to C# and making VSTO addins, please bare with me!

I'm using the add-in control ObjectListView (https://objectlistview.sourceforge.net/cs/index.html) to create a list of categories as part of VSTO Outlook Add-in.

I've added the control to my form (a user control) and set the following properties:
- View: List
- Show Groups: False
- Columns: One column added, AspectName "Category.Name" (also just "Name" was tried, without success).

Here is the code when the user control loads
  private void MyUserControl_Load(object sender, EventArgs e)
        {
            Categories categories = GetCategories();

            List<Category> myCategories = new List<Category>();

            foreach (Category c in categories)
            {
                myCategories.Add(c);
            }
           
            this.objectListView1.SetObjects(myCategories);
           
        }
  private void MyUserControl_Load(object sender, EventArgs e)
        {
            Categories categories = GetCategories();

            List<Category> myCategories = new List<Category>();

            foreach (Category c in categories)
            {
                myCategories.Add(c);
            }
           
            this.objectListView1.SetObjects(myCategories);
           
        }

I had thought that maybe the
Objectlistview
Objectlistview
didn't like the default collection of the categories so that's why I made a new
List<Category>
List<Category>
collection

The category collection is obtained via
  public Categories GetCategories()
        {
            Categories categories = Globals.ThisAddIn.Application.Session.Categories;
            return categories;
        }
  public Categories GetCategories()
        {
            Categories categories = Globals.ThisAddIn.Application.Session.Categories;
            return categories;
        }


when I run this I get six empty rows, which matches the number of categories on the outlook account (see picture).

Not sure what I'm doing wrong, I followed the guide the best I could. The Category.Name method should be returning a string so I don't think that's the problem. Must be missing something obvious as this control is supposed to be easier to use than a listview.
image.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

❔ Webview2 showing nothing just blank
C#CC# / help
3y ago
✅ Avalonia not showing rows in datagrid
C#CC# / help
2y ago
✅ Blank fields
C#CC# / help
4y ago
Xamarin blank screen
C#CC# / help
2y ago