public ObservableCollection<String> NamesWithLetterA
{
get
{
return new ObservableCollection<String>(Model.Names.Where(name => name.Contains('a')).toList());
}
set
{
PropertyChanged("Names");
}
}
excuse any coding errors. this example is for wpf; I would be using List<> and bindingsource in winforms. this code would be in a pseudo viewmodel, with Model being the backing datasource.
basically, anytime the backing field changes(which is everytime get is called), the databinding fails. I'm not sure what is going on in the background, but i just want to know if i can get this effect working. I hope its obvious what this effect is.

New Topic/Question
Reply




MultiQuote







|