$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
GridView Windows Forms Control
Filtering data in GridView in C# Windows Forms applications
Home > WinForms UI Controls > User Manual > Data Grid Filter Row in C#

GridView Rows Filtering in C# Windows Forms

The data filtering function support is built in the DataGridView .NET Component. It allows users process data filtering in any grid columns and rows. When users click in the filter cell, the cell editor will be open and will allow users set the filter condition. When clicking the filtering icon in the filter cell, a menu will be open and provide filter conditions including greater than, contains, less than, equals to, and more. Developers can also customize the grid data filtering features in C# code for Windows Forms projects.

How to Enable GridView Filtering in C#

To enable the GridView filtering in C#, we need to use the either the KetticGridView.EnableFilter or KetticGridViewTemplate.EnableFilter properties. The following are the simple C# code snippet to enable the properties.

this.ketticGridView.EnableFiltering = true;
this.ketticGridView.MasterTemplate.EnableFiltering = true;

How to Filter Data in Grid Rows in C#

To perform the data filtering in grid rows, the Kettic GridView component provides the GridFilterRowElement to represent the grid row for holding the data filtering boxes. This element will be shown automatically as soon as we enable the filtering to GridView as demonstrating above. When the GridFilterRowElement display, the users can easily pin it to the top or the bottom in the window. Moverover, it is able to make the filter row scrollable.

How to Hide Filter Row in C#

The Kettic GridView control allows the users to hide the operator text of the filter cells. This is achieved through change the value of the DidplayFilterCellOperator property to false. The simple C# code snippet below shows how to disable the property to hide the filter row.

this.ketticGridView1.MasterTemplate.DisplayFilterCellOperatorText = false;
It is also possible to hide the complete GridFilterRowElement by disable the DisplayFilterRow property as the C# code below demonstrating. By the way, the users are able to add FilterDescriptors in C#.NET even if the GridFilterRowElement is hidden.

this.ketticGridView1.DisplayFilterRow = false;
UI Controlsfor Windows Forms
.NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI Design
WinForms UI Controls