GorillaApe
GorillaApe

Reputation: 3641

Filtering data at datagrid wpf

I bind a dataset to a datagrid wpf like this

    DataSet d = Database.getBabies();
            babies = d.Tables[0].DefaultView;
      dataGridBabies.ItemsSource=babies;

Which is the best way to filter the data?(without running database query)

Upvotes: 1

Views: 1469

Answers (1)

testalino
testalino

Reputation: 5678

In XAML:

<CollectionViewSource x:Key="MySource" Source="{Binding Path=MyDataBase}" Filter="OnCollectionViewSourceFilter">

Upvotes: 1

Related Questions