WinForms - Data Grid - Find Panel Modes (v18.2)

WinForms Team Blog
30 October 2018

If you are a DevExpress WinForms user, you have very likely worked with our Data Grid before – it’s a staple of the product line. We are adding a few features in the v18.2 release, and our post in September already described Scrollbar Annotations and a few others. Now it’s time to look at the new Find Panel functionality!

Before v18.2, the Find Panel in the Data Grid only supported one behavior: it filtered grid data using the string entered by the user, and it hid all rows that didn’t match the criterion.

Data Grid Find Panel Filter Mode

For v18.2, we assigned this behavior – which remains the default – the name Filter Behavior. However, using the property OptionsFind.Behavior you can now also switch to a new mode called Search. In this mode, the Data Grid highlights matching rows but leaves other data visible at the same time. This means that the search feature resembles the way searching works in a web browser, or a document based application like Word or even Visual Studio.

Data Grid Find Panel Search Mode

As you can see in the screenshot, the buttons displayed next to the search string editor are Previous and Next in this mode. Using the keyboard, Enter and F3 activate the Next button, and Ctrl-Enter, Shift-Enter and Shift-F3 go to the Previous occurrence, providing an intuitive experience for most users.

The search string editor shows the number of rows that match the criterion, and the new Scrollbar Annotations are used in this mode to show the yellow highlights in the scrollbar that are also visible in the screenshot.

If you would like this mode to be the default for all Data Grid Find Panels in your application, you can set a static property like this:

WindowsFormsSettings.FindPanelBehavior = FindPanelBehavior.Search;

Finally, please note that the new Search mode is not supported for Server Mode data sources.

Please Let Us Know What You Think!

Your feedback is always welcome! What do you think about the new Search mode? Would you like to see this mode supported in other controls, like the WinForms Tree List or the WinForms Vertical Grid? Do you think the mode should become the default in the future?

Free DevExpress Products - Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We'll be happy to follow-up.
No Comments

Please login or register to post comments.