Customizing CRUD operations query


Is there a way to add custom where clause while fetching the result set on server side?
Also it should be retained on tool re run.
Please provide the steps if it is doable.

Anjul Mishra

Yes, you can do that. More info can be found here:

I revive this old thread because I have similar problem.
I have read the documentation, expecially the ordersByCity example applied to DataGrid.
Unfortunately this does not solve my problem. In the example I can see that the datagrid has no search fields or order buttons.
What I (we?) need is a simple way to put a filter of the get all records method so we can reuse generated CRUD.
I have tried adding a getRecordsCustom in my DB Controller (it is a partial class) but the radzen editor does not see my method.
Now I will do a workaround creating a view and switching the load query to the view when needed.

Are you looking for filtering outside of the grid - something like this?

It is more complex, what I need to achieve is this.
Filter button outside the grid: yes/no
If no the query that fills the grid must be a select * from foo
if yes the query must be select from * from foo f where not exists ( select * from foo f2 where f2.a=f.a, f2.b=f.b and>
In addition to this datagrid must be also filtered by columns using datagrid (in both cases).

No matter the filtering logic you can use the example to control the filtering in general. In this demo we are using custom filter function where you can combine both outside and grid filters:

You can use also Query Builder to build your filter expression visually:

Ok probably I expressed myself wrong and my problem is different.
I have seen and already used query builder.
But are you saying to me that with query builder is possible to build a query with "not exists" and subselect?
Putting in other way, I need to replace the AsQueryable method and build my personal query with a boolean to choose if adding also the not exists part.

Yes. Using the query builder you can build complex nested expressions like this:

It was added recently.

Very sorry but I still do not understand.
I repeat my sample query:

select from * from foo f where not exists ( select * from foo f2 where f2.a=f.a, f2.b=f.b and>

I have searched all forum and experts on internet and all say that it is not doable with odata.
Can you say me otherwise?
Thanks again,

Ah I see now! You want to select records that are not part of other select with filters. Indeed writing such OData query will be hard task however you can create a custom server method and write the query you want. Please check also this article for complex queries with custom methods: