UXGridView Part 3: Fundamental Grid Features

The core feature-sets that we wanted to focus in the first data controls CTP are the QueryDescriptor component model, and the fundamental grid architecture/features such as high-performance virtualization, adaptable layout, drag and drop, grouping and much more. In my previous post, I’ve explained how to use QueryDescriptor which greatly simplify server data access using MVVM design pattern. Now, I will share some of the fundamental grid features that already available in the first CTP, and what you can expect in the next release.

Virtualization

One of the most fundamental features in UXGridView is its high-performance virtualization (virtual rendering) architecture. This means that the UXGridView doesn’t actually render all the data passed to it. Instead, it implements a smart logic which virtually render the data based on the available view port and the current scroll position. This virtualization feature is applied to all types of cells and rows rendering including the RowGroupHeader and RowGroupFooter, so that you can expect a blazing fast and scalable grid control for your applications.

You can try to bind the UXGridView with an unbound collection that holds million of rows as follows.

Notice that the overall UXGridView performance is based on the view port, the smaller the view port the less objects need to be rendered, thus it will perform faster.

Adaptable Layout (Dynamic Row Height)

Since rows and cells can be represented in many ways, we included a nice feature to support dynamic row height in the virtualization logic. This feature enables you to use a wrapped textblock for the cell, or using a fluid template for the Row and RowDetail without compromising the virtualization feature. Several examples of this feature were already available in the downloadable CTP that you can play around.

To enable text wrapping in the cell, right now you need to customize the CellStyle and add a TextBlock with TextWrapping property enabled. In the next release, we will add a built-in property directly in the UXGridViewColumn to easily enable text wrapping.

Drag and Drop (Column and Group Reordering)

Drag-drop interaction is commonly found in a number of Grid operations such as column reordering, and group manipulation like adding group, removing group or reordering group. Thanks to ClientUI’s robust DragDrop Framework, we can quickly provide fluid drag-drop capabilities in the UXGridView. You can find more exciting UX features related to the drag-drop in the next and third milestone of the CTP release.

Data Grouping

If you are wondering why GroupDescriptors is not included in the QueryDescriptor, it’s because data grouping is considered to be a client operation rather than a server operation. To group a data in runtime, you drag a column header and drop it onto the GroupByBox element which you can enable through the GroupByBoxVisibility property.

You can also add some predefined group declaratively as follows.

Group Total and Aggregates

In addition to the data grouping, we also introduced GroupFooter which represent the aggregate values of a specific column for a specific group. There are five built-in aggregates supported in UXGridView which are: Average, Sum, Count, Min and Max. A more advanced, customized aggregate function is also planned in the next CTP release, which leverage the use of MVVM and multi-binding.

The following example shows how to enable the group footers, and specify the aggregate function for certain columns.

Upcoming UXGridView Features

In this post, you have learned some of the fundamental features available in UXGridView, such as virtualization, grouping, adaptable layout and drag-drop. We are currently topping off the rest of the features expected to ship in the CTP2 release due next week. One of the most exciting features is the unique data editing capability leveraging sophisticated custom editor concept and commanding. This will allow you to easily updating your data to the repository using MVVM design pattern. Stay tuned for our next announcement!

Best Regards,

Andry

Leave a Reply