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)
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)
You can filter data with use of CollectionViewSource. See here for reference
In XAML:
<CollectionViewSource x:Key="MySource" Source="{Binding Path=MyDataBase}" Filter="OnCollectionViewSourceFilter">