Datagrid serverside filtering

0 Answers 112 Views
DataGrid
Dominik
Top achievements
Rank 1
Dominik asked on 29 Jul 2022, 11:33 AM

Hi

I am using the Datagrid with Data Virtualization and I need to implement server side filtering.

So I added the "FilterRequested" command to get the information on how the user wants to filter. I then persist the filters in my viewmodel, clear all data in the datagrids itemsource, send a request to the server and refill the itemsource with the first <batchsize> of the filtered rows.  All following requests to the server (e.g.. throug scolling) will use the persisted filter values (and I do the same for sorting). This kind of works so far.

My Problem: I have a column that represents a state in form of an enum. Out of the box I can only filter for distinct states that are in the grid right now, but there are potentially more states in rows that have not been loaded yet. Is there a way to override the distinct filter options with static ones (in my case all enum values)? Even if there is an override, it is probably not possible to figure out which values were selected, because the DistinctValuesFilterDescriptor that is delivered via the FilterRequestContext of the command just gives me all elements that would be left after the filter, not the values selected.

kind regards
Dominik

Martin Ivanov
Telerik team
commented on 03 Aug 2022, 11:04 AM

I will check your requirement and see if I can come up with any idea about this later today.
Martin Ivanov
Telerik team
commented on 03 Aug 2022, 12:53 PM

I've checked for a possible entry point that can be used to replace the distinct values, but there isn't a suitable one. Can you show me how exactly do you use the FIlterRequested command, so I can see if I will get an idea from your specific setup?

No answers yet. Maybe you can help?

Tags
DataGrid
Asked by
Dominik
Top achievements
Rank 1
Share this question
or