I am using Radzen 2.86.8 to build a Blazor app and I am trying export filtered data from datagrid1. Can anyone recommend or provide a link with instructions? I am exporting with a button using grid0.Query.Filter as the filter. I keep getting a CS0103 error.
I have watched the video at Export Blazor DataGrid to Excel - YouTube and following these instructions I get the CS0103 error also.
Such errors was never reported before and we are not sure what it means.
In my page, datagrid0 rowselect passes a parameter to datagrid1. I have a button with a filter value ${grid1.Query.Filter}
The page works correctly without the filter. When I add the filter, then I get this:
error CS0103: The name 'grid1' does not exist in the current context
when trying to run the app
Make sure you have appropriate field/property declared in this page RadzenDataGrid grid1 assigned as @ref to the component:
<RadzenDataGrid @ref="grid1" ...
...
@code
{
RadzenDataGrid<Customer> grid1;
...
}
I found the @ref and changed the filter to match
<RadzenDataGrid @ref="datagrid1" Data="@Data23" TItem="dynamic" RowSelect="@Datagrid1RowSelect">
Now the CS0103 error is gone, but when the app starts and I click the export button, I get a browser error showing its missing the query
What’s your filter expression and Radzen.Blazor version? Do you have reference to System.Linq.Dynamic.Core? Keep in mind that this library is no longer supported due to vulnerability issues since Radzen.Blazor 6.0.
I dont think I am using the filter correctly I created a new page, set the value of datagrid0 to a dataset and then set datagrid0 filtermode to SIMPLE. When I enter values at the top of the column, the data filters and I am able to export the filtered data with ${datagrid0.Query.Filter} and no browser errors.
In the original page, I use datagrid0 to invoke a datasource with a parameter to filter the data and the set the property DATA23 to the ${result}
I set the value of datagrid1 to DATA23 and it displays the filtered data, but when i try to export it, that is when I get errors. I think the errors are from not having a filter in datagrid1, it is only displaying the filtered data. Can I export DATA23 directly?



