Hi,
I have hierarchies like one parent (p1) and three children (p1c1, p1c2, p1c3) with check boxes.
Here when I check and uncheck children individually binding works fine.
When I uncheck parent (p1) then check any children is not binding. In this case I unchecked parent then selected one child, but I am getting output as noting is selected.
Please let me know what is wrong here.
And I have one more requirement like; At least one node should be selected even though we uncheck all.
I have attached the sample project for your reference.
Thanks
Please find the attached word document for more details.
Hello Ranjith,
Thank you for contacting our community.
I have been looking through the sample you have provided and it seems that items are added in theList only if both the parent’s item and any of the child’s nodes are checked. You could change the query to:
from s in DataUtil.ParentChild
from t in s.Items
where t.IsSelected == true
select t).ToList();
so that the items in theList are added no matter if the p1 node is checked.
Please let me know if this helps you solve your issue.