xyzGrid; Quicksearch, Columns with Dateformatter not properly searchable
See original GitHub issueHi JaiQ,
John Ranger here again 😃
I have a grid where I have 3 columns (DateTime type in xyzRow.cs) where I have a dateformatter like this:
xyzColumns.cs
...
[DateFormatter(DisplayFormat = "yyyy-MM-dd HH:mm:ss")]
public DateTime TimestampStart { get; set; }
I would like now to be able to Quicksearch These visible Dates like “2016-02” or “2016-02-01” but it only allows me to search either for “2016” or “02” but I cannot Combine it like the above “2016-02”.
I tried with putting the dateformatter from the xyzColumns.cs to xyzRow.cs but without success.
Is this at all achievable and if yes, how would I do this? (I didn’t find a hint about this in the DEV-Guide)
Thanks for your help and
with Kind regards,
John
Issue Analytics
- State:
- Created 8 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Incorrect date format when using text to columns
I've got an issue when I am importing a text file and using the text to columns function where its not recoginsing the...
Read more >jqGrid search formated date using toolbar
When a search date is entered which contain only month and day the year is missing and the search is performed on the...
Read more >GridColumn format not working in KendoReact
Hello, Eric, Joe is right. In order to apply the correct format, the Grid expected the values inside the column to be valid...
Read more >Unable to get Excel to recognise date in column
Under column data format choose Date and select MDY in the adjacent combo box and click Finish. Now you got date values (i.e....
Read more >Help With Date Formatting - Microsoft Power BI Community
Hello, I was hoping to get some help regarding changing data type for one of my columns in PowerBI to a date data...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Yes, expression attribute and most other is close to SQL as possible. Just it might not be database agnostic but i’m planning to add something like Expression(“SqlServer”, “…”), Expression(“MySql”, “…”) etc to handle dialect specific cases.
Btw, this would probably be slow with big tables but you’re the database admin, so i suppose in that case you’ll come up with a calculated field and index on it.
Anyway glad to help, especially users who cares about helping others like you do 😉
To all wo reads this, I have solved the additional (hidden) quicksearch addon-fields like this (Suggestion of Volkan Ceylan):
In the xyzRow.cs, add a new stringfield like this:
where the convert(varchar(19),Timestamp_JobGenerated,120) is the command which will be used within the resulting SQL query. Timestamp_JobGenerated is the SQL table field where the original datetime value is stored.
The resulting query in my case Looks like this (when I typed 2016-02-22 in the search box:):
Hope this helps somebody.
With Kind regards,
John