Custom Value for Excel Style Filtering in Data Grid #13600
-
Hi, I have a grid with Excel Style Filtering and remote filtering enabled. Most of the data field values are from a small, known set of values, which can easily be pre-fetched and fit into memory, but there is one field that can be any number within +/- 4 billion. I want the user to be able to filter on this column as well as the others, but the excel style filter won't work because it requires that I pre-fetch all discrete values, and they cannot fit in memory. Is there a way to allow the user to specify their own custom value for this field in an excel style filter? That way, the user can get the best of both worlds, meaning, pick from a set of discrete values when there are few and provide their own value when there are too many. Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
@ChronosSF Bump, still seeking an answer, thank you |
Beta Was this translation helpful? Give feedback.
-
Hi @SkylerLutz, As far as I understand the scenario, I believe it can be achieved by leveraging the Templates feature of the Excel Style Filtering component. For the purposes of the example, the custom template is set only for the "CompanyName" column. Please, check out this approach and let me know if it helps achieve your requirement. If this is not an accurate demonstration of what you’re trying to achieve, please, provide more details on the requirement, or feel free to fork and modify the sample as well. |
Beta Was this translation helpful? Give feedback.
-
@ddaribo Thank you. Can you please provide another example that accepts and displays multiple search values OR'd together instead of just a single value? i.e. emulate the behavior of the native excel-style filter, minus the display of all possible search values. Thanks |
Beta Was this translation helpful? Give feedback.
Hi @SkylerLutz,
Sure, I can suggest leveraging the IgxCombo at the place of the input. It allows entering custom values to the combo’s data list, applying multiple selection and searching among them.
Similar to the default Excel Style Filtering, when constructing the filtering expressions tree, the values have to be passed as a set to the searchVal argument. Additionally, the filtering condition has to be “in”, so the values have to be specified as they are, for example:
The result set is an “or”-ed filtered list among the specified values for the column.
Here is a link to the new sample I prepared. Please, let me know if I can assist you with anything else on the matter.