A Lightweight, Flexible DataGrid
C1FlexGrid vs C1DataGrid
ComponentOne has two datagrid controls: C1DataGrid and C1FlexGrid. This page explains the differences between the two controls, the advantages of each, and the reasons to choose one over the other.
ComponentOne DataGrid is a powerful control for Silverlight and WPF. Its object model is based on Microsoft's DataGrid control, which makes it easy for developers to migrate to the C1DataGrid control when they need additional power and features such as built-in filtering, grouping, hierarchical support and much more.
ComponentOne FlexGrid is a simpler and lighter grid with a flexible object model as well as many unique features including unbound mode, flexible cell merging, multi-cell row and column headers, and so on. It is one of the most popular and powerful grids for the classic Windows Forms platform which is why many users requested a WPF/Silverlight version of the control.
You can pick the best grid depending on your application's requirements. The main differences are:
- C1DataGrid follows the Microsoft DataGrid object model, while C1FlexGrid follows the FlexGrid for WinForms object model.
- C1DataGrid supports detail rows, hierarchical data and a built-in grouping UI.
- C1FlexGrid supports unbound scenarios and is much lighter in size.
Feature by Feature Comparison
| RIA Services |  |  |
| Unbound data | |  |
| Excel-like filtering |  |  |
| Filter bar |  | |
| Drag-and-drop grouping |  | |
| Subtotals |  |  |
| Auto-size columns |  |  |
| Column and row freezing |  |  |
| Deferred scrolling |  | |
| Multiple selection modes |  |  |
| Multi-row column headers |  |  |
| Cell merging |  |  |
| Checkbox column |  |  |
| Combobox column |  |  |
| DateTime picker column |  | |
| Hyperlink column |  | |
| Add new row |  | |
| Custom rows |  | |
| Custom cells | |  |
| Hierarchical grid |  | |
| Paging |  | |
| Printing |  |  |
| Export to Excel |  |  |
| Clipboard |  |  |
| ClearStyle |  | |
| Toolkit themes |  |  |
| Silverlight/WPF compatibility |  |  |
| Size | < 700 KB | < 150 KB |
Differences between Silverlight and WinForms
In the FlexGrid for Silverlight a lot of the root level stuff is the same as the older versions you’re used to. For instance, you can easily access columns by name (i.e. c1FlexGrid1.Columns[“ColumnName”]) and you can access each individual cell with simple, coordinate indexing (i.e. c1FlexGrid1[rowIndex, columnIndex]). Instead of a DataSource property there is an ItemsSource. This is to keep consistent with all Silverlight and WPF controls.
The following tables summarize the main properties, methods and events in the FlexGrid for WinForms and the corresponding members in FlexGrid for Silverlight/WPF.