Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
565
Add Total Row at Bottom that does not change position
posted

Hi just like the title says. I am adding a row at the end of the sort or filter process (_AfterRowFilterChanged and _AfterSortChange) that will contain a total of certain columns that I want to keep as the last row. Is there a way to do this?

copyoftesttable.Rows.Clear()
            copyoftesttable.Columns.Clear()
            copyoftesttable = testtable.Copy
            copyoftesttable.Rows.Clear()

 

           testtable = copyoftesttable.Copy
            testtable.AcceptChanges()

            If testtable.Rows.Count - 1 > -1 Then
                cg.Compute(testtable, Me.copyofcolumnarray)

'trying to keep my total row at bottom here so it does not sort
                dgSearchResults.Rows(dgSearchResults.Rows.Count - 1).Fixed = False
            End If