Pending Review
Last Updated: 04 Dec 2020 04:13 by Prazdnik

1. Create tree model from class:


public class TreeNodeViewModel
{
    public string NodeName { get; set; }
    public IEnumerable<TreeNodeViewModel> Children { get; set; }
    public bool Expanded { get; set; }
    public string Color { get; set; }
    public string IconClass { get; set; }
}

2. Pass this tree for rendering to the component "TelerikTreeView".

3. An error comes out:

2020-12-03T09:44:15.312Z] Error: System.AggregateException: One or more errors occurred. (Object reference not set to an instance of an object.)
 ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.Blazor.Data.TelerikTreeViewDataSource.GetFlatItems(IEnumerable`1 tree, List`1 result)
   at Telerik.Blazor.Data.TelerikTreeViewDataSource.GetFlatItems(IEnumerable`1 tree, List`1 result)
   at Telerik.Blazor.Data.TelerikTreeViewDataSource.GetFlatItems(IEnumerable`1 tree, List`1 result)
   at Telerik.Blazor.Data.TelerikTreeViewDataSource.GetFlatItems(IEnumerable`1 tree, List`1 result)
   at Telerik.Blazor.Data.TelerikTreeViewDataSource.FlattenTree()
   at Telerik.Blazor.Data.TelerikTreeViewDataSource.InitData(IEnumerable`1 sourceData)
   at Telerik.Blazor.Data.TelerikTreeViewDataSource.ProcessData(IEnumerable data)
   at Telerik.Blazor.Components.TelerikTreeView.ProcessDataInternal()
   at Telerik.Blazor.Components.Common.DataBoundComponent`1.ProcessDataAsync()
   at Telerik.Blazor.Components.TelerikTreeView.OnAfterRenderAsync(Boolean firstRender)
   --- End of inner exception stack trace ---

 

Note: This problem is due to the fact that there are no children in the last node of the tree and IEnumerable Children == NULL. Method "GetFlatItems" in version 2.18.0 it had a NULL check, in version 2.20.0 it is not.

 
Pending Review
Last Updated: 25 Nov 2020 13:11 by Gerhard

I have a Bootstrap or Material based theme created from the ThemeBuilder. When I add it to my application I have noticed that the ShowInEdit property of the GridCommandButtons does not work as expected. 

<AdminEdit>

This is due to the lack of the k-hidden class. In order to solve the issue, you could add the following CSS rule to your <filename>.css file.

CSS:

    .k-hidden {
        display: none;
    }

</AdminEdit>