Greetings,
first of all I want to thank you for providing Radzen Blazor - great components
I´m currently using the RadzenTree in "LoadOnDemand" mode to display hierarchical data.
When I try to expand a node, the page seems to be deadlocked - but if you take a look at Visual Studio (or even set a breakpoint in the assigned "OnExpand" method) it looks like an endless loop.
The breakpoint is hit again and again, although I have only clicked expand once and the output window produces:
Blockquote
SELECT [v].[KmatResID], [v].[KmatResPhaseID], [v].[LaufnrToFeatureID], [v].[PhaseLaufnrID], [v].[beschreibung], [v].[childID], [v].[ebene], [v].[familyID], [v].[kmatfamilyid], [v].[parentID], [v].[programmdetail_id], [v].[sortierung], [v].[text], [v].[type]
FROM [dbo].[V_Tree_Complete] AS [v]
WHERE [v].[parentID] = @__ToString_0
ORDER BY [v].[text]
Microsoft.EntityFrameworkCore.Database.Command: Information: Executed DbCommand (12ms) [Parameters=[@__ToString_0='?' (Size = 4000)], CommandType='Text', CommandTimeout='30']
SELECT [v].[KmatResID], [v].[KmatResPhaseID], [v].[LaufnrToFeatureID], [v].[PhaseLaufnrID], [v].[beschreibung], [v].[childID], [v].[ebene], [v].[familyID], [v].[kmatfamilyid], [v].[parentID], [v].[programmdetail_id], [v].[sortierung], [v].[text], [v].[type]
FROM [dbo].[V_Tree_Complete] AS [v]
WHERE [v].[parentID] = @__ToString_0
ORDER BY [v].[text]
Microsoft.EntityFrameworkCore.Database.Command: Information: Executed DbCommand (11ms) [Parameters=[@__ToString_0='?' (Size = 4000)], CommandType='Text', CommandTimeout='30']
SELECT [v].[KmatResID], [v].[KmatResPhaseID], [v].[LaufnrToFeatureID], [v].[PhaseLaufnrID], [v].[beschreibung], [v].[childID], [v].[ebene], [v].[familyID], [v].[kmatfamilyid], [v].[parentID], [v].[programmdetail_id], [v].[sortierung], [v].[text], [v].[type]
FROM [dbo].[V_Tree_Complete] AS [v]
WHERE [v].[parentID] = @__ToString_0
ORDER BY [v].[text]
.... And so on .... and so on ....
Here´s the tree and the code behind:
<RadzenTree Data="Resources" Change="@OnChange" Expand="@OnExpand" Style="width: 100%; height: 100%">
<RadzenTreeLevel Template="@FormatNode" TextProperty="text" />
</RadzenTree>
internal async Task OnExpand(TreeExpandEventArgs args)
{
var child = args.Value as VTreeComplete;
var data = await GetChildrenAsync(child);
if (data != null)
{
args.Children.Data = data;
args.Children.TextProperty = "Text";
//args.Children.HasChildren = async (b) => { return await HasChildrenAsync(b, Data.AssemblyContext.TreeLevel.ProgDetailFeature); };
args.Children.HasChildren = (b) => HasChildren(b, Data.AssemblyContext.TreeLevel.ProgDetailFeature);
args.Children.Template = FormatNode;
}
}
Any idea why this happens?
Thank you in advance,
Andre