I’m fairly new to WPF and have since created applications with Win Forms and C#. In these Applications I often used a Datagridview to display data bound to SQL Databases. Filtering certain rows in the DGV was quite easy by accesing the attached Bindingsources.Filter property like:
myBindingSource.Filter = “ABCDEFG (<– Random Columnname) Like ” + textBox.Text;
Is there a similar easy way to Filter results returned in a Datagrid or am I forced to use stored Procedures to get my desired results. Or how does teh Filtering mechanisms work for the DataGrid in WPF.
These are many questions, however I’d be grateful for helping me getting a Foot into WPF.
Cheers
Max
there is a easy way. if you bind your datagrid to ado.net.
you can use the DefaultView of your datatable and simply set the filter.
the following code show how you can create a new “ViewFilter” and not the default one
xaml