【发布时间】:2013-05-16 18:41:53
【问题描述】:
我有 winform,当我单击列标题时它没有排序时有 datagridview 控件。 谁能告诉我怎么了?
【问题讨论】:
-
请向我们展示您的代码 sn-p?
-
没什么特别的,我只是像这样绑定数据网格:DataClasses1DataContext db = new DataClasses1DataContext(); bs = new BindingSource(); bs.DataSource = db.GetProducts.ToList(); dgvInventory.DataSource = bs;
-
查看此Post
-
你需要一个支持排序的
BindingList。 Google 将成为您的朋友。