Xceed Grid for WinForms v4.3 Documentation
FilterAndSearch Sample Application
Welcome to Xceed Grid for WinForms v4.3 > Sample applications > FilterAndSearch Sample Application

Programming languages

VB.NET, C#

Overview

This sample shows you how to perform searches for data within the grid's data rows and how to filter data through the use of custom grouping. It presents a user interface that allows the user to enter a search string and highlights any matching rows. If desired, the search results can be filtered by showing only the matching rows. It also allows the user to create, delete or add one or more levels of groups among other things. 

The search string text box is in fact a masked text box that facilitates the entry of the search string based on the contents of the column you are searching in.

Demonstrates

  • Searching through the grid's data using the GridControl.DataRows property 

  • Filtering data rows through custom grouping (two groups, one visible, one invisible) 

  • Bringing datarows into the grid's viewable area using the BringIntoView method 

  • Creating and manipulating groups at runtime via code 

  • Using a masked text box 

  • Displaying the GenerateReportForm to create reports

How to use

In the "Search" panel, select one of the grid's columns to search in, enter the text to search and then hit the "Search" button. This will highlight any matching rows. If you have created groups with the controls in the "Group" panel, these groups will be expanded and any matching rows inside them will be highlighted. 

The "Filter Search Results" button uses the custom grouping technique to display only the matching rows by keeping the other rows invisible.

Project location & filename

C#: Xceed Samples\Xceed Grid for WinForms v#.#\CSharp\FilterAndSearch\FilterAndSearchCS.csproj

VB.NET: Xceed Samples\Xceed Grid for WinForms v#.#\Visual Basic .NET\FilterAndSearch\FilterAndSearchVB.vbproj