Distinct values in a datatable

dtYourDatatable.DefaultView.ToTable(True,"ColumnName")

This will return a new datatable having only one column and distinct values of that column from the original table.

You can then iterate over this new datatable and in each iterationn use the datatable.select method for accessing only those rows where the distinct value matches.

8 Likes