Export filtered Datagrid

Hello,
Im trying to export DataGrid in my Blazor-application.
Filter and sort in datagrid are working fine.
The export-function was created while creating new CRUD-page - the filter and sort in invoke for the export are out of the box: ${grid0.Query.Filter} and ${grid0.Query.OrderBy}.

I get following error when i try to export filtered datagrid: ParseException: Expression expected;
and the filter in the URL is set to "filter=>i".
I already checked the radzen export-documentation, but i cannot find anything suspicious.

Thanks for help!

Hi @d.kotou,

We are unable to reproduce such behavior. Exporting a sorted DataGrid in a Blazor WebAssembly application seems to work as expected - the file is properly generated and contains only the filtered data. We will need more information:

  1. Does this happen with any filter on any column?
  2. Does it happen with any column type (e.g. string, number etc)?

Hello,
thank you for the answer.
It is actually not a problem with event.Filter - using only event.Filter(filtering directly in the columns) works for the export.

To load the datagrid, the user has to select a value from DropDownDatagrid -> ButtonClick reloads the grid;

I have two filters on the Datagrid: ${(string.IsNullOrEmpty(event.filter)? "true" : event.filter)} AND GebMonat eq "${p_GebMonat}" - as I said, it works to filter the grid.

I also tried to change the Razor.designer.cs and put it to ignore list
FROM:
await Gdbdata.ExportVNameToCSV(new Query() { Filter = $@"i => {grid0.Query.Filter}"....
(Would work without filter on GebMonat)
TO
await Gdbdata.ExportVNameToCSV(new Query() { Filter = $@"{grid0.Query.Filter}"....

Result: I get no error when exporting, but the exported data are not filtered on the GebMonat, only filtering in the grid(event.Filter) works.

Is this the right way to use two filters for the export?

Thank you!

I am afraid I don't understand what you are trying to achieve and what the problem is. You can prepare a sample application and send it to info@radzen.com for us to troubleshoot.