Avatar of mcs26
mcs26

asked on 

C# WPF Datagrid Filter List

Hi,

I have a WPF application that contains two datagrids. I have a object of type OrderBlocks which contains one list of type Orders, please see below.

class OrderBlocks
{
   public string setting;
   public List<Order> Orders;
}

class Order
{
  public double Amount;
  public int Name;
  public bool Status;
} 

Open in new window


What I would like is both of my datagrids to be bound to my list Orders. However I want one datagrid to show all orders in my list where the Status is true and the other grid to show all the orders where the status is false.

Also what I would like is if the user changes the status in one of the datagrids that the Order then moves to the other datagrid.

The link here
Example Solution shows a solution where ListCollectionView is subclassed. This sounds like a good example for me to follow, however I do not know how to go about this.

Just to mention that my list when bound to the datagrids will not add any new Orders and also the no Orders can be deleted.

Any help would be great.
Thanks,
M
Microsoft Development.NET ProgrammingC#

Avatar of undefined
Last Comment
Gautham Janardhan
ASKER CERTIFIED SOLUTION
Avatar of Gautham Janardhan
Gautham Janardhan

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
.NET Programming
.NET Programming

The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.

137K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo