Multiple SQL queries when clicking on the DataGrid column filter

When I click on any column filter, the list of values takes some time to be displayed. And I noticed that when clicking on any column filter the following SQL query is sent multiple (15+) times:

exec sp_executesql N'SELECT CASE
    WHEN [t].[c] = N'''' THEN NULL
    ELSE [t].[c]
END
FROM (
    SELECT DISTINCT TOP(@__p_2) CASE
        WHEN [a].[CustomerName] IS NULL THEN N''''
        ELSE [a].[CustomerName]
    END AS [c]
    FROM [customers] AS [a]
    WHERE [a].[AccountType] = @__Account_Type_0 AND [a].[EntityId] = @__Account_Id_1
) AS [t]',N'@__p_2 int,@__Account_Type_0 int,@__Account_Id_1 int',@__p_2=5,@__Account_Type_0=22,@__Account_Id_1=1

Why does the grid does this and is there a way just to send one query?

You can set FilterPopupRenderMode="PopupRenderMode.OnDemand" for the DataGrid.

It*s already set OnDemand

I'm afraid that this is what we can offer - feel free to debug the filtering by attaching our source code to your application. The LoadFilterValues method in RadzenDataGridHeaderCell.razor is called only when the popup is opened.