tree-file-system sample fails, problem with new Checkable delegate #1285

Closed
opened 2026-01-29 17:51:37 +00:00 by claunia · 0 comments
Owner

Originally created by @PavelVsl on GitHub (Jul 2, 2024).

When you try expand folder in sample
https://blazor.radzen.com/tree-file-system
unhandled exception is raised

problem is with new Checkable delegate (from version 4.33.0) which does not have default handler.
verson prior 4.33.0 works correctly

sample can be fixed with adding

args.Children.Checkable = o => false;

to method

    void LoadFiles(TreeExpandEventArgs args)
    {
        var directory = args.Value as string;

        args.Children.Data = Directory.EnumerateFileSystemEntries(directory);
        args.Children.Text = GetTextForNode;
        args.Children.HasChildren = (path) => Directory.Exists((string)path);
        args.Children.Template = FileOrFolderTemplate;
        args.Children.Checkable = o => false;
    }

Originally created by @PavelVsl on GitHub (Jul 2, 2024). When you try expand folder in sample https://blazor.radzen.com/tree-file-system unhandled exception is raised problem is with new Checkable delegate (from version 4.33.0) which does not have default handler. verson prior 4.33.0 works correctly sample can be fixed with adding `args.Children.Checkable = o => false; ` to method ``` void LoadFiles(TreeExpandEventArgs args) { var directory = args.Value as string; args.Children.Data = Directory.EnumerateFileSystemEntries(directory); args.Children.Text = GetTextForNode; args.Children.HasChildren = (path) => Directory.Exists((string)path); args.Children.Template = FileOrFolderTemplate; args.Children.Checkable = o => false; } ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#1285