【发布时间】:2018-05-20 11:48:54
【问题描述】:
我有一个 C# 自定义 MySortableBindingList : BindingList<MyClass>
它实现了所有用于排序的东西(SupportsSortingCore, SortPropertyCore, ApplySortCore(...) 等),其中MyClass : INotifyPropertyChanged
因此,我可以将此列表用于 Forms DataGridView (myDataGridView1.DataSource = mySortableBindingList1),并根据列/属性在我的 GUI 中对 DataGridView 进行排序。
现在的问题是: 我可以定义 UI DataGridView 的排序如何影响 MySortableBindingList 的顺序吗?
因为现在对 GridView 进行排序也会对 BindingList 进行排序,但我需要保持内部(原始)顺序,因为我需要使用存储的索引来访问列表。
提前谢谢你!
【问题讨论】:
标签: c# forms datagridview bindinglist