Hello,
I am trying to use the QueriableCollectionView class for DataGrid databinding.
I have the folowing code on window loaded event:
private QueryableCollectionView _qcv;
private void WindowLoaded(object sender, RoutedEventArgs e)
{
_qcv = new QueryableCollectionView(_entities.Countries);
radGridView1.ItemsSource = _qcv;
radDataForm1.ItemsSource = _qcv;
}
then:
private void ButtonDeleteClick(object sender, RoutedEventArgs e)
{
Country c = _qcv.CurrentItem as Country;
_qcv.Remove(c);
}
Can you tell me please why _qcv.Count remains the same? The item is not deleted? What am I doing wrong?Am i missing something?
Thank you very much.
PS: QueriableCollectionView.CanRemove returns false.
I am trying to use the QueriableCollectionView class for DataGrid databinding.
I have the folowing code on window loaded event:
private QueryableCollectionView _qcv;
private void WindowLoaded(object sender, RoutedEventArgs e)
{
_qcv = new QueryableCollectionView(_entities.Countries);
radGridView1.ItemsSource = _qcv;
radDataForm1.ItemsSource = _qcv;
}
then:
private void ButtonDeleteClick(object sender, RoutedEventArgs e)
{
Country c = _qcv.CurrentItem as Country;
_qcv.Remove(c);
}
Can you tell me please why _qcv.Count remains the same? The item is not deleted? What am I doing wrong?Am i missing something?
Thank you very much.
PS: QueriableCollectionView.CanRemove returns false.