views:

404

answers:

1

I have a DataTable. I'd like to sort its default view by a column name 'city'. I'd like the sort to be case-insensitive.

Here is the code I have:

DataTable dt = GetDataFromSource();
dt.DefaultView.Sort = "city asc";

MyReport.DataSource = dt.DefaultView;

Thanks.

A: 

Never mind. It's in the documentation.

DataTable dt = GetDataFromSource(); dt.CaseSensitive = true; dt.DefaultView.Sort = "city asc";

AngryHacker