My application has 19 datagridviews
In the Designer I added the datagridviews bound to my data table and set the columns
I use the following to filter what information is to be shown on each.
This is on a timer and runs several time a minute trying to keep it as realtime as possible.

Private Sub Load_MainMonitor()
        'Load, Sort, Filter MMArtist1 DataGridViews
        Dim MMArt1 As New DataView(Me.SSPE_InterCOMM1DataSet.SSPE_ArtScheduler)
        Me.DataGridView_MMArtist1.DataSource = Nothing
        Me.DataGridView_MMArtist1.DataSource = MMArt1
        MMArt1.Sort = "JobName"
        MMArt1.RowFilter = "([Artist Name] like '%Artist1%' and [Status] <> 'Complete')"
        'Load, Sort, Filter MMArtist2 DataGridViews
        Dim MMArt2 As New DataView(Me.SSPE_InterCOMM1DataSet.SSPE_ArtScheduler)
        Me.DataGridView_MMArtist2.DataSource = Nothing
        Me.DataGridView_MMArtist2.DataSource = MMArt2
        MMArt2.Sort = "JobName"
        MMArt2.RowFilter = "([Artist Name] like '%Artist2%' and [Status] <> 'Complete')"
        'Load, Sort, Filter MMArtist3 DataGridViews
        Dim MMArt3 As New DataView(Me.SSPE_InterCOMM1DataSet.SSPE_ArtScheduler)
        Me.DataGridView_MMArtist3.DataSource = Nothing
        Me.DataGridView_MMArtist3.DataSource = MMArt3
        MMArt3.Sort = "JobName"
        MMArt3.RowFilter = "([Artist Name] like '%Artist3%' and [Status] <> 'Complete')"
        'Load, Sort, Filter MMArtist4 DataGridViews
        Dim MMArt4 As New DataView(Me.SSPE_InterCOMM1DataSet.SSPE_ArtScheduler)
        Me.DataGridView_MMArtist4.DataSource = Nothing
        Me.DataGridView_MMArtist4.DataSource = MMArt4
        MMArt4.Sort = "JobName"
        MMArt4.RowFilter = "([Artist Name] like '%Artist4%' and [Status] <> 'Complete')"
    End Sub

I have been informed that each time the datagidview is filled that I need to clear it of the previous information first.

I am having no luck figuring this out. My lack of knowledge.

The code that was suggested to me uses dispose. But, when I use it, I get errors saying that the datagrid columns are not present when it trys to refill.

Can anyone help with this? My memory usage increases on every timer cycle to the point that my application will not shut off properly and my computer hangs.

Thank you in advance!

mention what you want to do , i will try to help you, use dataset for filling information, and then fill data grid-view via data set

Do the following

DataGridView_MMArtist1 =Nothing
Connection = Nothing

Do not forget to set Nothing to all the constructors you have used in the program.
Set forms to Nothing.


This will solve your problem.