KendoGrid MVC Filtering Problem

4 posts, 0 answers
  1. INFOLINE BILGI TEKNOLOJILERI
    INFOLINE BILGI TEKNOLOJILERI avatar
    7 posts
    Member since:
    Oct 2014

    Posted 03 Aug 2017 Link to this post

    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
  2. Stefan
    Admin
    Stefan avatar
    3067 posts

    Posted 07 Aug 2017 Link to this post

    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.
  3. INFOLINE BILGI TEKNOLOJILERI
    INFOLINE BILGI TEKNOLOJILERI avatar
    7 posts
    Member since:
    Oct 2014

    Posted 07 Aug 2017 in reply to Stefan Link to this post

    Hello Stefan,

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

    Kendo operator enums on pictures.

    What can i do to fix it ?

  4. Stefan
    Admin
    Stefan avatar
    3067 posts

    Posted 09 Aug 2017 Link to this post

    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.
Back to Top