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?