public static void SearchBarEnterPressed(Object sender, SearchBarEventArgs e) { // Using filtered objects will include parents which are not string matched. // It is necessary to remove them from the array first. NlmTreeListView listView = e.ListView; String searchString = e.Text; IList filteredNodes = new List <BaseTreeNode>(); foreach (BaseTreeNode treeNode in listView.FilteredObjects) { String name = listView.NlmColumns.NameColumn.AspectEngine.GetAspect(treeNode) as String; if (name.IndexOf(searchString, StringComparison.OrdinalIgnoreCase) >= 0) { filteredNodes.Add(treeNode); } } listView.SelectObjects(filteredNodes); }