WPF New Features - 2009 Volume 2
NetAdvantage® WPF controls 2009 Volume 2 continues to introduce new features that give the xamDataPresenter™ family of controls (including xamDataGrid™ and xamDataCarousel™) the broadest and the deepest set of features available. Now when you use the best performing, fastest WPF data grid on the market, you can deliver a rich user experience similar to what they are familiar with from Microsoft® Excel®, including the ability to export data to .XLS/.XLSX.
xamDataGrid and xamDataPresenter (in Grid View) - Enhanced!
We have again enhanced the most flexible, robust, and highly-configurable WPF data grid view available so you can rapidly develop application user interfaces full of rich functionality with ease.
Real-Time Record/Cell Highlighting
Alert your users as cell or record values change by highlighting how that value is presented. For example, if you have ever seen the large trading screens on the floor of an exchange or in a trading room, you see tables of prices flashing quotes in real-time. With the new DataValueChanged event handling available to you on a per-field basis, you can flash the grid's cells to call attention to them as their values change.

You can also fine-tune whether DataValueChanged fires only for those rows that are in view (the default which produces best performance), or for all allocated records by setting the DataValueChangedScope property on FieldSettings. For performance reasons, data records are not allocated until they are needed. So if you require DataValueChanged to fire for all data records (even those never in view) make sure you also change the control's RecordLoadMode to PreloadRecords.
Record/Cell Value Change History
We don't just give you the last value, but a value change history that can be maintained for up to N previous values. You just set how many past values you want to keep a history of with the DataValueChangedHistoryLimit property (default value 1) on FieldSettings.

Clipboard Support
Now your users can Cut, Copy and Paste from the data grid to another location in the same data grid, to another data grid, or to applications like Microsoft Excel. You can turn on this feature using the AllowClipboardOperations property on FieldLayoutSettings. Further fine-tuning allows you to include field labels in clipboard operations, or to disallow modification via the clipboard by Field.
Unlimited Levels of Undo / Redo Support
Of course, users can undo/redo these new clipboard operations (up to an unlimited number of times). Setting the IsUndoEnabled property on any data presenter control will activate this new feature, and you can control how much undo history is maintained through the UndoLimit property (its default value of 0 allows unlimited undo). But did you know that your users can also reverse most common UI operations that they can perform in the data presenter?
- Paste/cut/clear of cell values
- Edits to cell values
- Deleting records
- Resizing fields
- Moving and dragging fields
- Fixing/unfixing fields
- Hiding/unhiding fields
- Grouping-by and ungrouping-by fields
- Sorting on fields
- Resizing records and cells
- Fixing/unfixing records
- Expanding/collapsing records
- Filters, or clearing of applied filter conditions
- Summary changes made by the summary button.
Since deleting records in a transaction-processing system may require compensation to undo, we have designed an UndeleteRecordsStrategy abstract class from which you can derive. Give us this object as the UndeleteStrategy on the RecordsDeletingEventArgs passed to you in your handler for the RecordsDeleting event, and we will use it to reverse the deletion of the record(s).
No other WPF data grid on the market offers such fine-granularity in its Undo/Redo support. This greatly improves end user productivity in backing out any changes they have made.
Field Chooser
Much like in the Windows® Explorer shell or Microsoft Outlook® messaging and collaboration client, your users can now choose from a list of fields that they want to add or remove from the grid's field layout. Let your users decide if they want to work with a simple view with only a few fields, or a detailed view filled with many fields, using a field chooser you can customize.

Bands and fields can be excluded from the choices presented to users in the field chooser. We also provide you with the ability to filter fields with the FieldFilters property, so that your users see only a subset of available fields, based on custom criteria such as "show users all date fields to choose from."
Field Auto-Sizing
Users can double-click on the far edge of a field so that it resizes to accommodate the width of its content, just like in Microsoft Excel. With numerous new properties, you can optimize how, where and when Auto-Sizing behavior takes place in your application.

As an example, you can have a field size itself to its contents when it is first used with a width of FieldLength.InitialAuto. This performs a one-time snapshot to size the content, determining the field's size once rather than everytime its content grows wider, and saving you time from calculating the field's size yourself in an event handler.
You may want to control what kinds of elements appearing in the field affect its width calculation, and you can do that with the FieldSettings' AutoSizeOptions property. It can limit the basis of the width calculation to any or all of:
- Field Labels
- Filter Cells
- Data Cells
- Summaries
Auto-Sizing can be scoped to limit how many data records are considered when calculating the auto-sized field width. Initially it is scoped to the currently displayed records only for best performance, but it can be scoped to any of these settings through the AutoSizeScope property:
- Records currently displayed only
- Any records that may be visible to the users (excluding records that are currently collapsed or hidden)
- All records
You can also trigger an auto-size to occur programmatically, and an AutoSizeField routed command has been added to the DataPresenterCommands class.
Field Star-Sizing
You can now specify proportional sizes for your fields using "star-notation" (e.g., a Width of 2 and a FieldLengthUnitType of Star). Proportional (or "star"-sizing) of your fields allows you to control how the dimensions of the cells in each field are weighted compared to the dimensions of the grid view as a whole, so that if the user resizes your control then your star-sized fields will resize proportionately, too.
Enhanced Grid View
You can now display the WPF data grid as a flattened list of records so that it minimizes the number of elements needing to be displayed. This reduces the depth of the grid's visual tree, leading to faster display and scrolling performance. It also allows you to have your hierarchies or groupings of records go to practically unlimited depth, because records in this optimized, flattened list are not indented.
Fixed Records
In addition to supporting fixed fields, the grid view allows your users to now fix records into place so that they can appear frozen at the top or bottom while non-fixed records continue to scroll in the middle. We use an easily recognizable pushpin indicator, which your users can use to fix a record in place to the top or bottom.

You can custom style the appearance of these fixed records, and their pushpin indicator (the FixedRecordButtonElement), allowing you to design one consistent look and feel that spans across your entire application UI.
Cross-Band Grouping
Enable your users to now group records by common value, even when the fields are at different levels of your data hierarchy. Users can drag fields conveniently into and out of a new, completely stylable group-by area that appears when GroupByAreaMode is set to MultipleFieldLayouts (you can set GroupByAreaMode to DefaultFieldLayoutOnly if you prefer your users continue using the old group-by area, although it does not permit cross-band grouping).

IDataErrorInfo
Controls in the xamDataPresenter family now support your use of the .NET Framework's IDataErrorInfo interface to expose information that will be used to notify the user through the UI that an error has occurred. A tooltip displays a custom error message, and the error can be indicated using a designable indicator at any of the cell, field, and/or record levels.

If you have custom validation logic you would like to apply to fields on the data presenter, you can provide custom validation rules on the ValueEditor's ValueConstraint and ValidationRules property. When the cell value is not valid according to this validation logic, it will display an error to the user through the same UI as we use for IDataErrorInfo error indications so your users have one consistent user experience.
xamDataCarousel and xamDataPresenter (in Carousel View) - Enhanced!
xamDataCarousel (and the xamDataPresenter in Carousel View) presents data in a carousel as opposed to the more conventional table of rows and columns. It has been enhanced with these features (already described above) that are applicable to a carousel view:
- Real-time Record/Cell Highlighting
- Record/Cell Value Change History
- Clipboard Support
- Unlimited Undo/Redo
- Field Chooser
- Field Auto-Sizing
- IDataErrorInfo
DataPresenterExcelExporter™ - NEW!
Let users export the contents of any xamDataPresenter, xamDataGrid or xamDataCarousel to Microsoft Excel's widely-interoperable .XLS/.XLSX file formats so that they can work with this data outside of your application, or share it with their co-workers.

Owing to the rich nature of what you can do in terms of cell presentation with XAML and templates, not everything that your user sees in WPF can be automatically carried over into the cells of an Excel worksheet. For example, if you were to supply a custom CellValuePresenter, then your cells that rely on inherited brush resources will be seen by users in WPF, but not in the exported worksheet.
You can easily customize many different kinds of exported cell appearances (including background, color, borders and font) by making simple property settings on their ExcelCellFormatSettings attached property. This allows you to selectively carry over the visual richness of your data grid into the exported worksheet in a way that provides an optimal viewing experience for your Excel users.
If there are certain aspects of the data presenter shown to the user that you do not want taken into account by its exported worksheet, you can easily exclude them using the ExportOptions class. This way the user can obtain the data without any of the sorting, filtering or grouping they may have applied to it within your WPF application.
See What's New in Prior Releases
Every release of the NetAdvantage WPF controls adds value and features onto the release that came before. You can read more about what was new in previous volume releases here, or by consulting the "What's New" page in the accompanying documentation.
Renew Today!