G
Guest
I have a datagridview to which I bind a collection like
LanguageGridView.DataSource = languageCollection;
Later I remove a language object from languageCollection, so the
languageCollection.Count changes from say 20 to 19. Then i try to bind the
data again
LanguageGridView.DataSource = languageCollection;
But i get an error saying
"System.IndexOutOfRangeException. Index 19 does not have a value
at System.Windows.Forms.CurrencyManager.get_Item(Int32 index)..."
How can I show the updated collection in the grid. I have tried Rows.Clear
but since my datacollection doesn't implement IBindingList it doesn't work
LanguageGridView.DataSource = languageCollection;
Later I remove a language object from languageCollection, so the
languageCollection.Count changes from say 20 to 19. Then i try to bind the
data again
LanguageGridView.DataSource = languageCollection;
But i get an error saying
"System.IndexOutOfRangeException. Index 19 does not have a value
at System.Windows.Forms.CurrencyManager.get_Item(Int32 index)..."
How can I show the updated collection in the grid. I have tried Rows.Clear
but since my datacollection doesn't implement IBindingList it doesn't work