DataGridView bound to datasource requires data in datasource?
I have a DataGridView which I want to use to add dynamic data to it. To start with my datasource a SortedList has no data in it. I will dyamically add data to it over time. However every time I add a new row of data
privatevoid addSecurityToolStripMenuItem_Click(object sender,EventArgs e){
string symbol ="Foo" + newSecurityID;newSecurityID++;
Security sec =newSecurity(symbol, 100.12, 100.15, 100, 200,SecurityTypeEnum.eStock,true,"Up");sortedList.Add(symbol, sec);
bindingSource1.Add(sec);
dataGridView1.Invalidate();}
the row is blank. I have used the debugger to see that the data is there.
Then a strange thing happened, I added some data to the datasource prior to the ...
bindingSource1.DataSource = sortedList.Values;
...And data started to showup. It looks like if I add just one row of data prior to doing the binding, any rows added after that point will show up. But I must have one added before the bind or else all the dynamically added rows will be blank.
I tried out other samples that I have created. In one case removing the data for the datasource causes a crash with the error "Object reference not set to an instance of an object" somewhere deep in windows code.
Is this a known bug?

