Clear BindingSource ?

danijel.drmic

Member
Joined
Jul 2, 2009
Messages
10
Programming Experience
5-10
I delete the BindingSource in this way and this works but is very slow:
VB.NET:
For i = 1 To DataGridView1.RowCount - 1
   FrekvencijaBindingSource.RemoveCurrent()
Next i
When i try this:
VB.NET:
FrekvencijaBindingSource.Clear()
I get error :" Cannot clear this list. "
Does anyone know what is the problem?
 
Using the data source configuration wizard I've created a new database ( "Analiza") which has a table ( "Frekvencija").
Then I took datagridview -> datagridview tasks -> choose the data source and I took FrekvencijaBindingSource...
 
So you seem to be saying, without actually saying, that your BindingSource is bound to a DataSet. While I would have thought that calling Clear on the BindingSource would work, if it doesn't then try calling Clear on the bound DataTable.
 

Latest posts

Back
Top