What happened to your question I answered yesterday? This question is exactly the same as that one. I said for WPF use DataGrid
instead of DataGridView
. I provided the following code as sample code for doing that.
SqlConnection SqlConnect = new SqlConnection(connectionstring);
SqlConnect.Open();
SqlDataAdapter adapter = new SqlDataAdapter("SELECT * FROM dbo.Courses", SqlConnect);
DataSet myDataSet = new DataSet();
adapter.Fill(myDataSet, "Courses");
Grid.DataContext = myDataSet;
Grid.ItemsSource = myDataSet.Tables[0].DefaultView;
That is for SQL Server but I explained how to use it for OLE/DB.
Filtering is much more complicated.