Тёмный

Data Filtering in a ListView [WPF] 

Tactic Devs
Подписаться 5 тыс.
Просмотров 11 тыс.
50% 1

In this tutorial I demonstrate how to filter data in a listview control

Опубликовано:

 

3 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 15   
@maxdesko
@maxdesko 2 года назад
Great video, very straight forward, well explained. Thanks!!
@rodelioliwag7627
@rodelioliwag7627 Год назад
Thank you very much. This is a treat,
@ganapathipasupathi1666
@ganapathipasupathi1666 Год назад
It is very useful to me, Super man 👌
@wojciechspirin4984
@wojciechspirin4984 2 года назад
Great tutorial, nicely explained ;) You also cloud use INotfiyPropertyChanged interface to observe if Textbox or ComboBox have been changed ;) Anyway great tutorial ;)
@TacticDevs
@TacticDevs 2 года назад
Thank you for your advice , I usually try as much as possible to make it beginner friendly
@Locrum
@Locrum 2 года назад
Very useful. How would you implement this using MVVM? Also, if you wanted to filter by Country, then by status, how would that work?
@MG-vm9pf
@MG-vm9pf 2 года назад
Thank you so much!
@Minaco053
@Minaco053 Год назад
Very useful tutorial, but I have problem when filtering with int values. Can you help me?
@Minaco053
@Minaco053 Год назад
I tried like this but its not working --> private bool NumOfTouristsFilter(object obj) { var filterObj = obj as TourRequest; return filterObj.NumberOfTourists.Equals(FilterTextBox.Text); }
@nikex8496
@nikex8496 2 года назад
How can I filter numbers oder dates like "21" or "26.10.1965" ?
@TacticDevs
@TacticDevs 2 года назад
You can add a property of datetime type on the object. When you pass the object to the filter method,inside method you can access the datetime’s date,month,year then you can specify the conditions that the object should meet by specifying the date,month or year
@nikex8496
@nikex8496 2 года назад
@@TacticDevs thanks for the fast answer. That sounds a bit complicated for me as a beginner, but makes sense. Maybe it is better when u have the list from a database and then filter? And btw i got the problem when i filter something else like "year" it doesn't work with the same code. The searchBox filters everytime the first and second group.
@TacticDevs
@TacticDevs 2 года назад
@@nikex8496 so what I meant was if you’re trying to filter by a date you might want to store the date information in a property of the type datetime this way you can have control over what part of the date you want to filter by whether it’s the month,day or year
@TacticDevs
@TacticDevs 2 года назад
So for example you would add another property to the user class in this case (date of birth),then when filtering you would filter by the date of birth property, for example you want to filter all the dates that are in the month March, in this video tutorial I was filtering by the name property in your case you would have to filter by the (date of birth)property
@TacticDevs
@TacticDevs 2 года назад
So this piece of code you would write in your filter method If(User.Dateofbirth.day == 3) { return true; } else { return false; } So what this piece of code is saying is that if they user has date of birth that is in the month of March then add this user to the filtered list if not then exclude the user, to achieve this you have to add a property to the user a class of the type datetime
Далее
Data Grouping In a ListView [WPF]
15:05
Просмотров 11 тыс.
The Alternative to Deleting Data in .NET
11:11
Просмотров 32 тыс.
How Many Twins Can You Spot?
00:17
Просмотров 11 млн
V16 из БЕНЗОПИЛ - ПЕРВЫЙ ЗАПУСК
13:57
🦊🔥
00:16
Просмотров 634 тыс.
Is LEARNING WPF still WORTH it in 2023?
10:59
Просмотров 52 тыс.
The Basics of Data Binding in WPF
20:53
Просмотров 43 тыс.
Wpf DataGrid Excel Like Filter
58:35
Просмотров 7 тыс.
C#/WPF - Learning the DataGrid
1:42:38
Просмотров 11 тыс.
Being Competent With Coding Is More Fun
11:13
Просмотров 88 тыс.
Data Sorting In a ListView [WPF]
20:37
Просмотров 6 тыс.
WPF Controls with MVVM: DataGrid
24:59
Просмотров 173 тыс.
10 Crazy Python Operators That I Rarely Use
11:37
Просмотров 23 тыс.