Grid capabilities Scrollable, Filterable, PageSize and DataSourceRequest - no need to have a seperate dropdown to filter?

0 Answers 45 Views
Grid
Blazor
Top achievements
Rank 1
Iron
Blazor asked on 25 Apr 2023, 12:59 AM | edited on 25 Apr 2023, 01:00 AM

Have a common scenario - a Grid that has an MVC controller method for its DataSource read action.  Can someone confirm If Im understanding the capabilities correctly.  I dont supposed I realized that if I used the features on the Grid - I dont need to manually provide UI elements to filter the grid :)  

(1) Having Scrollable() enabled and using the DataSourceRequest with PageSize = N  (not explicitly setting Pageable), I will get the capability to fetch only N records at a time and if using an IQueryable and calling something like myData.ToDataSourceResult(request), where myData is an IQueryable and request is the passed in DataSourceRequest - the result will be a query that is already updated before its actually executed? This is what I normally refer to as paging, but without any page numbers etc.  Just fetching a limited number of records at a time, instead of the whole thing.

(2) If Filterable is ALSO enabled, I do not need seperate UI widgets to get values for filtering the data serverside by modifying a query before its executed, but rather the filters are embeded within the DataSourceRequest and just happens?  I tested this and this seems to be the case.   futher more, this all works with the above, eg getting only N records at a time.

Question
If I have 2 filters applied on my grid, one for a date and one for a name/string, along with PageSize = 50, how does this affect the actual query that gets executed?  Is it applying WHERE conditions first then doing a Take(N) records, or does the Take happen first?

 

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Blazor
Top achievements
Rank 1
Iron
Share this question
or