Marto

Marto

  • NA
  • 8
  • 0

Simple Datagridview code

Jun 12 2008 12:32 PM
m new to C#.NET and am stuck, I need to compare all the rows of a datagridview at the values of a given column and if the values in the given column of the two rows dont match return the value of the column of that current row.Hence getting unique values. (Am sure someone has done this before here).

That is given that you will be checking if (datagridView.Rows[z].Cells[0].Value.toString() != datagridView.Rows[z+1].Cells[0].Value.toString())

So it should return the value of the first. This should run thru the full datagrid returning the unique values only.

Answers (2)