Advertisement

10.29.2007 at 05:04AM PDT, ID: 22924060
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

VB.NET WinForms - DataGridView - Adding new rows, removing old ones to AcceptChanges

Tags: datagridview, row, new
Hi Experts,

I am using the following to refresh my dataGridView. Instead of rebinding i need to add only new items into the datatable and remove the old ones. It adds the new rows, but fails to remove the old ones!



            '--------------------------------------------------------------------------------------------
            ' Start                                                                               New Row
            '--------------------------------------------------------------------------------------------
            'Dim newDT As DataTable = db.Feed_KSE_KARS_Quotes_GetNew(2, 0, Me.Label1.Text).Tables(0)
            'Dim newRow As DataRow
            'For Each newRow In newDT.Rows

            '    If Not newRow("row") Is DBNull.Value Then

            '        Dim currentRow As DataRow = DT.NewRow
            '        Dim i As Integer

            '        Dim dv As New DataView(DT)
            '        dv.RowFilter = "Row= " & newRow("row")
            '        DT.Rows.Remove(dv.Table.Rows(0))

            '        For i = 0 To newRow.ItemArray.Length - 1
            '            currentRow(i) = newRow(i)
            '        Next
            '        DT.Rows.Add(currentRow)

            '        'DT.Select("Row=" & newRow("Row"))
            '        'DT.PrimaryKey = col
            '        'DT.Rows.Remove(DT.Rows.Find(newRow("Row")))

            '    End If
            'Next

            'DT.AcceptChanges()
            '--------------------------------------------------------------------------------------------
            ' End                                                                                 New Row
            '--------------------------------------------------------------------------------------------
Start your free trial to view this solution
Question Stats
Zone: Programming
Question Asked By: feesu
Solution Provided By: TheLearnedOne
Participating Experts: 2
Solution Grade: A
Views: 250
Translate:
Loading Advertisement...
10.29.2007 at 05:15AM PDT, ID: 20168816

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
10.30.2007 at 02:27AM PDT, ID: 20175517

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
10.30.2007 at 03:17AM PDT, ID: 20175691

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
11.30.2007 at 02:56PM PST, ID: 20385945

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
20080236-EE-VQP-29 / EE_QW_2_20070628