Before I began working with WPF I couldn't believe that Microsoft hadn't supplied a basic data grid. Once I began working with WPF in depth I thought... why are people complaining so much about not having a data grid, WPF gives you the power to build your own relatively easily. Here is some of the insight and considerations for making a selection between a Third Party Data Grid and the WPF GridView. I looked at both the Xceed DataGrid for WPF and Infragistic’s xamGrid from a feature prospective and this is what I have determined.
Disadvantages of using third party grid: • Having to deploy another dependency for the application. • If other applications reuse the development artifacts (we are using a composite application approach where modules could be consumed by other applications) they will also have to take on the dependency. • UI Designers that want to model UI will have to take it as a dependency. • Third party control API may not be consistent with the WPF framework in the way it implements styling, templating or other WPF concepts.
Advantages of using third party grid:
No development required to support common grid scenarios that are not supported with the current WPF grid.
The typical grid scenarios for Data Grids would include: • Sorting and Sorting Indicators • Multi-field sorting • Grid line support • Grouping • Alternate row highlighting • Auto Fit for column for expanding columns to fill available space • Grouping with multilevel support • Rich in place editing (events to support Row / Column / Cell activity or validation) • Auto select of cell editor by data type • Unbound columns to enable displaying of calculated data • Nesting support • Row Height based on largest item
If you consider the above features I think it makes it a lot easier to determine when a third party data grid should be considered.
GridView – The following are fairly easy to implement in the current WPF GridView and examples are found on the Internet. • Sorting and Sorting Indicators • Multi-field sorting (I know I saw this somewhere, but can't find the link) • Grid lines support (Example1, Example2) • Grouping (Example1, Example2) • Alternate row highlighting (Example1, Example2) • Auto Fit for column for expanding columns to fill available space
Third Party Data Grid - As soon as you cross into needing support for one or more of the following, a third party data grid makes more sense because of the increased complexity to implement these types of features in WPF with an average development team. • Grouping with multilevel support • Rich in place editing (events to support Row / Column / Cell activity or validation) • Auto select of cell editor by data type • Unbound columns to enable displaying of calculated data • Nesting support • Row Height based on largest item
Posted in WPF |Comments [0]
Sysknowlogy