defaultview

Get the DefaultView DataRowView from a DataRow

Here's the situation: I need to bind a WPF FixedPage against a DataRow. Bindings don't work against DataRows; they work against DataRowViews. I need to do this in the most generic way possible, as I know nothing about and have no control over what is in the DataRow. What I need is to be able to get a DataRowView for a given DataRow...

C# How do I reset table.DefaultView.RowFilter?

Hi all, The code below works fine and filters the rows correctly but how would I restore the table to its original state? DataTable table = this.dataGridView1.DataSource as DataTable; table.DefaultView.RowFilter = comboBox.Text + " LIKE '%" + strName + "%'"; Thanks ...

DataTable Filtering

Hi, I have a method that gets a list of numbers and filters my datatable according to it. I use this code: string MyQuery = CreateQueryMethod(MyNumbersList); MyDataTable.DefaultView.RowFilter = MyQuery; But if I get an empty list, MyQuery is just: "" // (string.empty) and if RowFilter is an empty string it shows the entire datatabl...