I have a tree control with checkboxes enabled. The tree displays a list of folders that contain sub-folders, reports, or both. When a user selects a folder, a data grid populates with a list of reports that folder contains. When they expand a folder, any sub-folders are listed in the tree. This all works as expected. The problem seems to happen when we need to add interactivity to these components.
The desired/expected behavior is, if a user checks an item in the tree, it will select all items in the data grid too. Instead, the item in the tree is selected and none of the event handler code for the Change/Select events fires. If the user selects another item in the tree and then re-selects the checked item, the data grid now has every item in it inside the collection of selected reports.
I had several pictures of this behavior to better illustrate the problem. However, due to your forum's settings, I was only allowed to add 2 pictures to this post. Here is the initial and the final state. I'll leave it to your imagination to fill in the blanks
This is the tree control and data grid
Not pictured: selecting a checkbox and not seeing the grid items chosen.
Not pictured: choosing a different item on the tree (NOT checking it, just selecting it)
After selecting a different tree item and returning to the checked item, the data grid displays correctly even though no event handler ever fired
What am I missing to handle the selections when they happen in real time? I've defined handlers for the ValueChanged, Change, and Expand events but none of them is processed when an item is selected and added to the @selectedFolders IEnumerable
<RadzenTree @ref="Tree" Data=@TreeData @bind-CheckedValues=@selectedFolders ValueChanged="(args => OnValueSelect(args))" Expand="OnExpand"
Change="(args => OnTreeSelect(args))" AllowCheckBoxes="true" AllowCheckChildren="false">