>This looks like it would do exactly what I need. Thanks so much.Great! You're welcome! =0)
~~Bonnie
>>Hi Linda,
>>
>>As far as I know, using the .ToTable() method of a DataView is the only easy way to get a DataTable of unique values. You'd need to use this syntax:
>>
>>
>>DataTable dtUniqueCities = MyDataSet.Tables["Customers"].DefaultView.ToTable(true, "City");
>>
>>
>>That will create a datatable with 1 column (City), and a unique list of the cities.
>>
>>If you need to use more than one column to determine uniqueness (say, City and Zip), you'd do it like this:
>>
>>
>>DataTable dtUniqueCities = MyDataSet.Tables["Customers"].DefaultView.ToTable(true, new string[] {"City", "Zipcode"});
>>
>>
>>which will give you a DataTable with two columns, City and Zipcode, containing a unique combination of the two column values.
>>
>>~~Bonnie