mcs26
asked on
C# 4.0 WPF Datagrid Filtering
Hi,
I have an object (please see code below) which contains a list. This list is currently binded to a datagrid in my WPF application.
What I would like to do is to be able to display only some of the results from my list based on the field Status. Can someone please send me some example code of how to do this?
C# Code
XAML
I have an object (please see code below) which contains a list. This list is currently binded to a datagrid in my WPF application.
What I would like to do is to be able to display only some of the results from my list based on the field Status. Can someone please send me some example code of how to do this?
C# Code
class OrderBlocks
{
public string setting;
public List<Order> Orders;
}
class Order
{
public double Amount;
public int Name;
public bool Status;
}
XAML
<DataGrid DataContext="{Binding OrderBlock}"
Name="dataGridOrders"
ItemsSource="{Binding Orders}"/>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.