L
lucassus
I've created simple list:
IList<XXX> _list = new List<XXX>();
_list.Add(..);
_list.Add(..);
and I've added this _list as data source of the ListBox control.
xxxBindingSource.DataSource = _list;
xxxListBox.DataSource = xxxBindingSource;
Afterwards I'm adding, removing, editing items by xxxBindingSource.
xxxBindingSource.Add(new XXX(...));
xxxBindingSource.Add(new XXX(...));
xxxBindingSource.RemoveCurrent(); ..etc.
The question is: how to synchronize xxxBindingSource with _list? For
instance after I had added item do xxxBindingSource it wasn't appeared
in _list collection (vice versa).
Thanks for help.
£ukasz
IList<XXX> _list = new List<XXX>();
_list.Add(..);
_list.Add(..);
and I've added this _list as data source of the ListBox control.
xxxBindingSource.DataSource = _list;
xxxListBox.DataSource = xxxBindingSource;
Afterwards I'm adding, removing, editing items by xxxBindingSource.
xxxBindingSource.Add(new XXX(...));
xxxBindingSource.Add(new XXX(...));
xxxBindingSource.RemoveCurrent(); ..etc.
The question is: how to synchronize xxxBindingSource with _list? For
instance after I had added item do xxxBindingSource it wasn't appeared
in _list collection (vice versa).
Thanks for help.
£ukasz