Issue with filters in version Version 2.12.0 (Mac)

Hi, in my application I have several pages where I select from a master table and then show data from a child table in multiple data grids. These children datagrids read from the same table, but each of them uses a different filter that includes the value from the master table and a second condition filtering by a second field with different values. This is something that may be better done using a filter value on the specific column for the children datagrids but I never got the filter value to work.
I have to create another one this morning, after the update, and I noticed something strange. Whenever I modify the filter for one of the grids by entering the value in the second condition it overwrites the other two. I could see that happen with the .json file open.
I have fixed the issue by modifying the .json file and it is working well but if I edit the filter on any of the grids I have the same issue again.

Hi @luissisamon, this doesn't sound like a known issue and we are not sure how to reproduce it locally. If you own a Radzen Professional subscription feel free to send us the meta directory of your application over email.

I had a similar issue some days ago, can you post that filter-string in here?
I didn't get the filter-value to work either, it was rendered in the filter-textbox but did not affect the resultset.

That is exactly what it happens here...


But filter value never worked for me, the new issue is a little bit more of a concern but can be easily fixed editing the json

About your screenshot: you are setting the filtervalue to


but it should be


But this wasn't what I wanted to see anyhow :smiley:
Please show me the string, which is in the textfield of the $filter parameter in radzen (where you executed your invoke-data-source-method).

it does not matter without the quotes still does not work.
The $filter parameters work, or used to work, I have to edit the json now. The filter not working is when I use a filter value in the column, like this.

When I define the filter using the query editor I had no issues, but I will not open it as I do not trust overwriting the files with the right string.

If you show data depending on other grids you better not work with the filters above the grid, these are there for the enduser. If you want to filter data depending on some parent grid you better pass that filter on to the whole query for the grid.
(this is what I assumed to get when I asked you about your filter-string)

In this example-screenshot I invoke a getOrders-query on the Select-Event of my Exhibitor-DataGrid (Parent: Exhibitor, Child: Orders). The result gets written in a parameter, which is set as the data-property of my Orders-DataGrid

Yes, I use this like here

The problem I found was when using multiple conditions (2 actually)

The thing I do not like about how I do things is that I need to do invoke 3 times and apply a different filter to the same dataset. Maybe is a more elegant way of filtering the data, but not a big deal right now.

Yes! Here we go. The problem is about the multiple filters. And these can be written, but are hard to read the more conditions you add. Basically you create a bunch of strings which - in the end - get joined and then evaluated to result in a nice readable string (which you will only see in the generated ts-file).

But it's possible, here is an example:

${(this.arg1 ? 'SomeID eq '' + this.arg1 + '' and ' : (event.filter ? event.filter + ' and ' : ''))}${this.checkboxArg2.value ? 'Status ne 689' : 'true'}

This example creates a filter with multiple conditions, in one invoke-statement.
Is argument1 here? if yes, add it and add ' and '. if no, just continue to add any other filter (they all need to be nested inside each other with this (arg1 ? arg1 : nothing) syntax.
In the end it's important to add a 'true' string because every condition you add gets an ' and ' so the whole string of conditions always ends with 'and true' which makes the query valid.

1 Like

Thanks, I rather work with text than using the editors.