I want to refresh my list because right now I have a custom List with a sub List and I want to have each sub list entry as a separate line.

Code:
class WDFFileList : List<WDFFile>, System.ComponentModel.IListSource
{
    public bool ContainsListCollection
    {
        get
        {
            return true;
        }
    }
    public System.Collections.IList GetList()
    {
        List<WDFEntry> entries = new List<WDFEntry>();
        foreach (WDFFile f in this)
        {
            foreach (WDFEntry e in f.Entries)
            {
                entries.Add(e);
            }
        }
        return entries;
    }
}
Now this "works" as in when I first set the databind GetList() is called. But how do I refresh the datasource? Like when I add some entries I want to update the listbox.

I have tried
Code:
UsageList.DataSource = null;
            UsageList.DataSource = Files;
But GetList() wasn't called.

Just tried this
Code:
class WDFFileList : List<WDFFile>, System.ComponentModel.IListSource
{
    public List<WDFEntry> Entries = new List<WDFEntry>();

    public void Refresh()
    {
        Entries.Clear();
        foreach (WDFFile f in this)
        {
            foreach (WDFEntry e in f.Entries)
            {
                Entries.Add(e);
            }
        }
    }

    public bool ContainsListCollection
    {
        get
        {
            return true;
        }
    }
    public System.Collections.IList GetList()
    {
        return Entries;
    }
}
Still didn't update.


How do you update a custom datasource? Or am I approaching this wrong?