L
L
LagunaBlue2021-05-07 17:09:19
C++ / C#
LagunaBlue, 2021-05-07 17:09:19

How to filter datagridview by current date, week and month on button click?

Hello. I have a datagridview that has a date field. By pressing a certain button, for example, "Today", the table should be filtered, after which the table will contain records only for the current date, and so on with the rest of the buttons "This week", "This month". I searched many sites, but did not find anything significant. Help me please.

609549b1293e3269222511.jpeg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Korotenko, 2021-05-07
@firedragon

Grid has a property for filtering. In addition, you can filter the source and call databind, look in the documentation on the Microsoft website
Approached the computer, see this example
https://stackoverflow.com/questions/5843537/filter...
There is also filtering at the data source level, and in the grid itself

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question