Closed Xounay1 closed 2 years ago
Hello, you need to have a BindingSource with a DataSource with DateTime type column in order to use the Date kind filter. Take a look to the sample project as reference.
My Datasource is using datetime , my field in the DB is a datetime.
My issue 👍
I'm using en-US culture
You have to check the DataSource of the BindingSource attached to the DataGridView. Take a look at the sample project. Another sample you can look at is this porject here https://github.com/davidegironi/dentned
what should I check at the DataSource level ?
In my datatable the column is set as System.DateTime, in the database the type is DateTime as well.
You should iterate each DataTables, and check for the DataColumn type.
I only have 1 datatable,
I tryied to create a new simple project just doing a TOP (100) on a DateTime field from a simple Table, I'm experiencing the same issue.
Could it related to my OS culture info ? or to my datetime data format setup ? HKEY_CURRENT_USER\ Control Panel\International\sShortDate HKEY_CURRENT_USER\ Control Panel\International\sShortTime HKEY_CURRENT_USER\ Control Panel\International\sTimeFormat
I also tried to create a simple project loading dynamically data from a SQL query(forcing to CAST AS DATE) to a datatable then filling the ADGV with the datatable, same result.
UP
Hello,
When I'm trying to filter date or datetime columns, the filter form is displaying nodes like string.
Can you help me please ?