This is a migrated thread and some comments may be shown as answers.

Datasource Filter for Date not being applied

4 Answers 235 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Francis
Top achievements
Rank 1
Francis asked on 07 Jun 2017, 05:31 PM

I am trying to filter a grid with a custom button on my toolbar by applying a date filter.

The button works and places the correct date in the column filter as shown in picture but does not fire the Filter action.

If I open the Column filter and press filter, then it applies it.

Jquery button action:

$('#GridSampleLog').data().kendoGrid.dataSource.filter({
field: 'DateToDispose', operator: 'lt', value: getDate()
});

 

See attached pictures for after click and after click on Filter.

I am using other filters that work well for integer values.

Using ASP.Net core UI version 2017.2.504

4 Answers, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 12 Jun 2017, 09:00 AM
Hello Francis,

I tried to replicate the behavior you describe, however, I was not able to. Filtering works as expected on my end. I also made a short video that illustrates the behavior I am observing. Please check it out below and let me know if I am missing something.


With that said, ensure that the getDate() function returns a Date object. You can also test the behavior with a hard-coded value and see if it makes a difference.

In case the issue persists please send us a dojo example or a runnable project where it is replicated. This will enable us to examine the behavior and look for its cause.


Regards,
Viktor Tachev
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Francis
Top achievements
Rank 1
answered on 15 Jun 2017, 07:38 PM

Dojo works but dojo is not using UI ASP.net Core product. It seems to be only js/jquery.

http://dojo.telerik.com/atuTu

I have hard coded the date and it does not work in my solution.

Can you try with a real Core example and try to replicate this way?

0
Accepted
Georgi
Telerik team
answered on 20 Jun 2017, 10:41 AM
Hi Francis,

I have set up a small sample (dynamic-filter.zip) which illustrates how to filter data items of the Kendo Grid widget dynamically.

Please check it out and let me know if it works for you.

Regards,
Georgi
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Francis
Top achievements
Rank 1
answered on 20 Jun 2017, 01:18 PM

I found my problem. I had a malformed Date object.

thank you Viktor and Georgi

Tags
Grid
Asked by
Francis
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Francis
Top achievements
Rank 1
Georgi
Telerik team
Share this question
or