WPF Data Grid
Compact, efficient data display - made fast and beautiful.
The WPF Data Grid allows you to view, compare and edit multiple data items in a compact, spreadsheet-like format, presented according to your exact specifications and extensible to your particular domain. Easy to implement and incredibly customizable, the WPF Data Grid provides out-of-the-box support for paging, frozen columns, sorting, validation and much more, plus five gorgeous themes to make it fit elegantly with Office-style applications. Extensive support for custom editors makes it easy for you to tailor the editing experience to the kinds of data your business uses and the way your users think about that data. And thanks to its highly tuned virtualization core, the WPF Data Grid remains lightning quick even with truly massive data sets.
- Easily bind and display a data collection
- Customizable look and feel
- High performance, even with millions of records
- Frozen columns
- Column reordering
- Many built-in editors, or build your own for custom data
- Multiple selection modes
- Five gorgeous themes included
Easy data binding
The Data Grid was built from the ground up following the WPF design paradigm, so all standard binding features are available. Populating the control is as easy as setting the ItemsSource property to bind to your data model. For each column, you can either specify a property name which will automatically setup a binding to your model objects, or you can set a display-member-binding which gives you flexibility of more complex binding paths that can also include converters and string formats.
Underpinning the WPF Data Grid is a virtualization engine which keeps memory footprint low and application speeds high. Even if you're binding to a large data set, the Data Grid will only create UI visuals for what is necessary. With more than a million records we've clocked the data grid at loading the data in under 400ms! And once the data is loaded, scrolling through those millions of records remains an incredibly responsive experience.
Rich data editor support
The Data Grid comes with automatic support for editing DateTime and Color properties using built-in pickers, as well as drop-downs for enum fields and TextBox support for text and numeric properties. It's easy to modify these for particular properties, and to enable your users to view or edit more exotic data types, using the familiar WPF DataTemplate idiom.
Built-in paging support
Lots of data to show? No need to overwhelm your users -- the WPF Data Grid can break it up into conveniently sized pages. Users can easily navigate through data using the built-in paging control, and the control provides many appearance and behavior options, including placement of ellipsis, number of page buttons displayed and page size.
Grouping the data by one or more columns is a great way for users to find and compare data. The data rows will be grouped together based on matching cell values in the specified columns. Groups are separated by headers that display a discoverable title for each group and allow the user to collapse away groups to simplify the view. Grouping can either be achieved programmatically or by displaying the UI grouping panel. The grouping panel makes it easy for users to group and ungroup the data by dragging and dropping the column headers. Various options allow you to customize the look of the grouping headers or prevent users from grouping particular groups.
Hierarchical data support
The data grid supports hierarchical data in a similar way that a tree view does. All the children can be collapsed under their parent objects using the toggle buttons in the first column. The data grid can handle any number of hierarchy levels and still perform well due to virtualization.
Items source flexibility
The data grid supports all sorts of data structures making it very flexible for different application requirements and coding preferences. To quickly get started with using a data grid in your application, you may want to start off with using a simple list of data. If you need the data grid to update as items are added or removed from the items source at run time, then either use an observable-collection or a binding-list. And for those who love data-tables, the data grid will support you by matching row for row and column for column.
Advanced column features
Clicking on a column header will sort the records using a default comparer, or provide your own comparer for custom sorting logic. Some number of columns can be frozen meaning they get docked to the left of the data grid and aren't affected by horizontal scrolling. Users can reorder the columns to customize the way they view the data using simple drag and drop operations. Columns can use various sizing strategies such as absolute, fill or automatic widths. Properties on the data grid can give your users as much flexibility as you want, or lock down the user interface to its core.
Click the thumbnail images below to see full sized images. These are just a taste of what is possible thanks to the power and flexibility of Windows Presentation Foundation. The five themes included in WPF Elements are ready to be deployed in your application, or you can customize your own using the included themes as examples.
Paging support combined with column sorting -powerful, intuitive behavior for your users
|The Alloy Light theme with two built in cell editors; ColorPicker and ComboBox||Customizing a column template is easy and produces impressive dynamic results|