Filter always on every loading page?

3 posts, 0 answers
  1. Louis
    Louis avatar
    85 posts
    Member since:
    Jun 2011

    Posted 25 Aug 2019 Link to this post

    Hello everyone,

    It's possible to apply a filter on one field automatically?  When I load the page I want one filter applied without the user have to do it each time.  Of course he can remove it.

     

    See attachment.

     

  2. Tsvetomir
    Admin
    Tsvetomir avatar
    757 posts

    Posted 27 Aug 2019 Link to this post

    Hi Louis,

    A default filter could be set to the data source of the Grid as follows:

    .DataSource(dataSource => dataSource
        .Ajax()       
        .Filter(f => f.Add(a => a.Discontinued).IsEqualTo(true))

    This would always apply a filter to the data source upon its initial load. 


    Best regards,
    Tsvetomir
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. Louis
    Louis avatar
    85 posts
    Member since:
    Jun 2011

    Posted 27 Aug 2019 in reply to Tsvetomir Link to this post

    Thanks a LOT Tsvetomir.  It's works #1!
Back to Top