Grey out parents when filtering

Grids for WPF Forum

Posted 7 months ago by Dirk Zellerfeld
Version: 23.1.3
Avatar

Assuming my tree is

- Cars

---- Toyota

---- Honda

When I use a string filter and search for "Honda" the tree looks like

- Cars

---- Honda

What I want is to grey out "Cars" only (NOT "Honda"), because it doesn't match the search string. It is to make the matching results more visible (alternatively highlight the matches somehow). Because if you have large trees and search for something the parents which don't contain the search word creates lots of noise and make it difficult to find what you're looking for. Is this somehow doable? If not, could this become a possible feature in next version?

Comments (3)

Answer - Posted 7 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Dirk,

First, let me check... Have you seen our TreeListBox QuickStart named "Filtering with Captures"?  While it doesn't gray out non-matched ancestor items, it does show how matched items can have very visible highlights, drawing attention to them.  At the top of the sample, you can see a DataTemplate where the highlight foreground, background, and font weight can be set.  Will that work for your needs?


Actipro Software Support

Posted 7 months ago by Dirk Zellerfeld
Avatar

In sample browser application it says "the sample ..../MainControl" was unable to load. So I never realized what this sample was but after opening the sample files in windows explorer, yes this is exactly what I wanted..

Posted 7 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Dirk,

Thanks for reporting that, it looks like the classic non-SDK Sample Browser project we ship in the installer didn't have the TreeListBoxFilteringWithCaptures folder manually included.  We'll fix that for the next build.  If you open the project and Show All Files, you can manually include the folder, and then run the app project to see the sample in action.


Actipro Software Support

The latest build of this product (v24.1.2) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.