Apply sorting also in tree view.