Skip to content

How do i compare rows in two different datagrids?

Tilewa Ononuga

Asked Nov 6, 2006, 10:39 PM EST1 answer
Share
LinkedInX
Hi, i have two different datagridViews. But both have two common columns. how do i compare all rows in both grids using the contents of one column as a primary key and comparing the value of the other column. plus how do i then move common rows into a new grid and all uncommon rows into another grid so i would have two grids - one containing matched rows and another containing unmatched rows? please i need this info urgently. thanks all, in anticipation.

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • Mahesh Chand
    0
    Instead of using DataGrids, you may want to use DataSet, DataView or DataTable, whichever objects you are using to fill the DataGrids. It will be easier to compare data there and then you can move data base and forth and refresh the grids.
    0