C
C#2y ago
Slem P

C# wpf mvvm Datagrid filter using LINQ

So here I have a MVVM form. the Form contains a Datagrid which is connected to the Databank. I also have a ComboBox which I want to use as a filter option. The Filter option shoud filter by the "AnlV nr" so when the user selects "01" from the ComboBox the datagrid should refresh and show only that "AnlV nr" that have "01" Below I will share you the code and you can see that i've gotten as far as showing the "AnlV" values in the ComboBox but I now do not know how to do the rest and make the filter work. Below is my Viewmodel and the Xaml code. If anyone can help me with this I would really apreciate it. Viewmodel: https://paste.mod.gg/tkpwmlsfinzm/0 wpf: https://paste.mod.gg/kjpzganipcsn/0
BlazeBin - tkpwmlsfinzm
A tool for sharing your source code with the world!
BlazeBin - kjpzganipcsn
A tool for sharing your source code with the world!
1 Reply
Slem P
Slem POP2y ago
public List<AnlVhistText> lstAnlVTexte
{
get

{

return _lstAnlVTexte;
}
set
{

_lstAnlVTexte = value;
OnPropertyChanged("lstAnlVTexte");

}
}
public List<AnlVhistText> lstAnlVTexte
{
get

{

return _lstAnlVTexte;
}
set
{

_lstAnlVTexte = value;
OnPropertyChanged("lstAnlVTexte");

}
}
this is the itemsource for the datagrid.
Want results from more Discord servers?
Add your server