ComponentOne True DBGrid for WinForms
True DBGrid for WinForms Tutorials / Tutorial 21: Adding a Filter Bar
In This Topic
    Tutorial 21: Adding a Filter Bar
    In This Topic

    In this tutorial, you will learn how to use the grid's Filter Bar functionality to allow the end user to sort column data dynamically at run time. Complete the following steps:

    1. Start with the project created in Tutorial 1: Binding True DBGrid to a DataSet.
    2. After the existing code in the Load event of Form1 add the following line:

      To write code in Visual Basic

      Visual Basic
      Copy Code
      Me.C1TrueDBGrid1.FilterBar = True
      

      To write code in C#

      C#
      Copy Code
      this.c1TrueDBGrid1.FilterBar = true;
      

    Run the program and observe the following:

    You've successfully completed adding a filter bar; this concludes the tutorial.