Hi Jensen,
Create a DataView for the original DataTable sorted by that column. Create a
new DataTable you'll be inserting rows to. Start from the first DataView's
row, adding a new row to the destination table with all the data from the
source row. Then skip all rows having the same value in the column. Once the
value in the column changes, add this row and again skip further rows having
the same value. Do so until you've processed all rows in the view.
This is a off-the-top-of-my-head solution, I can't remember whether
DataTable's Select method supports the DISTINCT feature.
--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx
"Jensen bredal" <je************@yahoo.com> wrote in message
news:eq**************@TK2MSFTNGP09.phx.gbl...
I have a DataTabel object filled with table data from a database.
The table contains rows that have the same data in a particular column.
How can i make a new copy of the datatable removing the repeating rows?
Many thanks in advance
JB