如何使用IsChecked属性将对象集合绑定到IsChecked项?
这是我的目标:
public class Person
{
public int Id {get;set;}
public string Name {get;set;}
public bool IsChecked {get;set;}
}
public class EditorModel
{
public BindingList<Person> People {get;set;}
}这些对象都实现了INotifyPropertyChanged。
我可以做这样的绑定:
checkedListBox.DataSource = editorViewModel.People;
checkedListBox.ValueMember = "Id";
checkedListBox.DisplayMember = "Name";如何绑定第三个属性IsChecked?我试着搜索它,但我没有找到任何解决方案。
发布于 2012-06-28 03:31:31
将数据源绑定到CheckedListBox中的所有解决方案都不是很优雅。使用带有复选框列的DataGridView。
https://stackoverflow.com/questions/11231661
复制相似问题