A general question for advice on the implementation.
I've got a collection bound to a datagridview
.
BindingList<Line> allLines = new BindingList<Line>();
dataGridView1.DataSource = allLines;
I want to implement virtual mode
because the collection could contain millions of entries (Line
objects) so I thought it may be quicker to only 'cache' or display a few entries that are needed at a time. Which is what I understand virtual mode to be for?
I've looked at: http://msdn.microsoft.com/en-us/library/2b177d6d.aspx
But I can't get it to work for a datagridview
that is databound
.
I can't specify the row count:
this.dataGridView1.RowCount = 20;
`RowCount property cannot be set on a data-bound DataGridView control.`
EDIT: this link suggests I may have to remove the binding completely. Is this the case? http://msdn.microsoft.com/en-us/library/ms171622.aspx
'If bound mode does not meet your performance needs, you can manage all your data in a custom cache through virtual-mode event handlers.'