Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个数据表。我想按列名“城市”对其默认视图进行排序。我希望排序不区分大小写。
这是我的代码:
DataTable dt = GetDataFromSource(); dt.DefaultView.Sort = "city asc"; MyReport.DataSource = dt.DefaultView;
谢谢。
没关系。它在文档中。
DataTable dt = GetDataFromSource(); dt.CaseSensitive = false; dt.DefaultView.Sort = "city asc";