In this tutorial, you will see how to use the C1ExpressView component to filter and sort table data and how to bind data-aware controls to table data that is defined in a different form. Complete the following steps:
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
Dim form As New Form2() form.ShowDialog() |
To write code in C#
C# |
Copy Code
|
---|---|
Form2 form = new Form2(); form.ShowDialog(); |
Number of Components | Name | Namespace |
---|---|---|
1 C1ExpressView | C1ExpressView1 | C1.Data.Express.C1ExpressView |
1 C1TrueDBGrid | C1TrueDBGrid1 | C1.Win.C1TrueDBGrid.C1TrueDBGrid |
Property | Value |
---|---|
RowFilter | City = 'London' |
Sort | ContactName |
When you press the Show Form2 button, the form appears with the grid filled with filtered and sorted data from the Customers table: it includes only customers from London and is sorted by ContactName.
Notice that setting Sort is only one (programmatic) of the two possible ways to sort table data; the end user can also sort it interactively in the grid clicking on a column header.