Hello every body,
i'm using TreeGrid with setSelectionType(SelectionStyle.MULTIPLE);
i get selected nodes with ListGridRecord[] selection = grid.getSelection();
now i would like to filter/reduce the selection array like following:
if a parent and one of his children is selected, this children should be removed from selection.
consider the example of processing a deletion:
a folder node "/folder1/" and one of his children "/folder1/file.xxx" is selected
if a try to delete the selected nodes (ie from a file system), first i delete the folder "/folder1/", the deletion of his children is actually not necessary, any way the error occures, because the file "/folder1/file.xxx" is already deleted...
i hope, the idea/problem is clear, so how can i filter/reduce the selection to match my criteria?
cheers
andre
i'm using TreeGrid with setSelectionType(SelectionStyle.MULTIPLE);
i get selected nodes with ListGridRecord[] selection = grid.getSelection();
now i would like to filter/reduce the selection array like following:
if a parent and one of his children is selected, this children should be removed from selection.
consider the example of processing a deletion:
a folder node "/folder1/" and one of his children "/folder1/file.xxx" is selected
if a try to delete the selected nodes (ie from a file system), first i delete the folder "/folder1/", the deletion of his children is actually not necessary, any way the error occures, because the file "/folder1/file.xxx" is already deleted...
i hope, the idea/problem is clear, so how can i filter/reduce the selection to match my criteria?
cheers
andre
Comment