I'm working in WPF
MVVM
application in which i have a scenario where i need to clear a list which is binded as two way to a radGrid
(i.e) have to show the grid empty on click of a button.
I tried using ,
SeriesSearchList.Clear();
//Does not work.
SeriesSearchList = null;
// Works.
I have declared in this way,
private List<SeriesSearchBO> m_lSearchList;
public List<string> SeriesSearchList
{
get { return this.m_lSearchList; }
set
{
if (this.m_lSearchList!= value)
{
this.m_lSearchList= value;
OnPropertyChanged();
}
}
}
Just curious why am i not able to have the List.Clear()
working with two way binding.