This is a migrated thread and some comments may be shown as answers.
Filter always on every loading page?
2 Answers 4 Views
This is a migrated thread and some comments may be shown as answers.
Louis
Top achievements
Rank 1
Louis asked on 25 Aug 2019, 03:32 PM

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 Answers, 1 is accepted

Sort by
0
Tsvetomir
Telerik team
answered on 27 Aug 2019, 10:42 AM
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.
0
Louis
Top achievements
Rank 1
answered on 28 Aug 2019, 01:23 AM
Thanks a LOT Tsvetomir.  It's works #1!
Tags
Grid
Asked by
Louis
Top achievements
Rank 1
Answers by
Tsvetomir
Telerik team
Louis
Top achievements
Rank 1
Share this question
or