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

KendoGrid MVC Filtering Problem

3 Answers 137 Views
Grid
This is a migrated thread and some comments may be shown as answers.
INFOLINE BILGI TEKNOLOJILERI
Top achievements
Rank 1
INFOLINE BILGI TEKNOLOJILERI asked on 03 Aug 2017, 10:31 AM
Hey
I have some problem with Kendo.Grid()
I wanna add filter for some column value then is NULL.
Code here:
x.Ajax().Read(r => r.Action("DataSource", "SRV_Service", new { area = "SRV" }))
.Filter(f => f.Add(s => s.PID).IsEqualTo((Guid?)null))
Datasource when i use null value filter.
https://resimyukle.xyz/resim/KU48JA

MVC Enums for filter operators
    public enum FilterOperator
    {
        IsLessThan = 0,
        IsLessThanOrEqualTo = 1,
        IsEqualTo = 2,
        IsNotEqualTo = 3,
        IsGreaterThanOrEqualTo = 4,
        IsGreaterThan = 5,
        StartsWith = 6,
        EndsWith = 7,
        Contains = 8,
        IsContainedIn = 9,
        DoesNotContain = 10
    }

And your "Operator used in FilterDescriptor" keys has IsNull operator
http://docs.telerik.com/aspnet-mvc/api/Kendo.Mvc/FilterOperator
How can i do append IsNull operator on Kendo.Mvc.FilterDescriptor ?
Please help me

3 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 07 Aug 2017, 05:58 AM
Hello,

In order to apply the isNull filter operation, the following syntax has to be used:

.Filter(f => f.Add(s => s.PID).IsNull())

I hope this is helpful.

Regards,
Stefan
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
INFOLINE BILGI TEKNOLOJILERI
Top achievements
Rank 1
answered on 07 Aug 2017, 09:44 AM

Hello Stefan,

I did searched but i didn't. ( IsNull() operator )

Kendo operator enums on pictures.

What can i do to fix it ?

0
Stefan
Telerik team
answered on 09 Aug 2017, 06:37 AM
Hello Hello,

If the operator is missing I can assume that the application is not using the latest version of Kendo UI, as the Null and notNull operators are added later to the Grid filter operators.

I can suggest upgrading to the latest version of Kendo UI to take advantage of all new features and bug fixes.

If the application is using the latest version and the issue still occurs, please provide a runnable example and I will gladly investigate.

Regards,
Stefan
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.
Tags
Grid
Asked by
INFOLINE BILGI TEKNOLOJILERI
Top achievements
Rank 1
Answers by
Stefan
Telerik team
INFOLINE BILGI TEKNOLOJILERI
Top achievements
Rank 1
Share this question
or