Monday, December 20, 2010

XtraGrid Views Hierarchy

XtraGrid uses views to display data from a bound data source. This document describes the hierarchy of View classes provided by XtraGrid.


Views Hierarchy
• BaseView is the ultimate View class and it implements basic functionality. The class is abstract and so you cannot create instances. It declares virtual methods to work with editors, appearances, hints, details, and saving and restoring layouts, but these are implemented by class descendants.

• ColumnView introduces methods to work with columns and rows/records. The class is abstract, so you cannot create instances.

Columns represent fields from the bound data source, while rows correspond to data source records. ColumnView does not determine how columns and rows are arranged. The ColumnView class implements methods to manipulate columns, access particular rows and cells, maximize details, display hints, sort and filter data, multiple row selection.

• GridView represents data in a tabular form.

The View supports grouping, incremental search, calculating summaries, displaying master-detail relationships, and displaying preview sections. It also provides the means to customize the View layout via context menus. Columns can be anchored to the left or to the right View edge. Such columns are not horizontally scrolled with the View.

• BandedGridView extends the functionality of the Grid View by introducing bands used to combine similar columns. Columns can be displayed only by adding them into a band. Hiding a band automatically hides all columns that belong to that band. The BandedGridView class supports only a single-line column arrangement. Bands can be anchored to the left or to the right edge. Fixed columns are not supported.

• AdvBandedGridView extends the functionality of the BandedGridView. The View allows you to arrange columns within bands into multiple lines. Columns can have different heights.

• LayoutView displays records as cards, supporting multiple field layouts. Cards can be arranged in single or multiple columns or rows, or using an advanced carousel mode, where cards form an ellipse with a transparency effect.

• CardView displays each record as a simple card, arranging fields vertically in a single column. See the Card View document to learn more.


If these Views do not suit your particular needs, you can create a custom View class by deriving from the one that most closely matches your requirements. If you need to implement a completely new data representation, you can derive from the BaseView class. The ColumnView class provides methods to work with columns. So you can derive from this class, if arranging columns in a particular manner is required. If you only need to modify the default behavior of GridView, BandedGridView, AdvBandedGridView or CardView, then you should use the corresponding class as the ancestor for your custom View.

Information on the layout of the View's elements is stored in the View's protected ViewInfo object. This specifies the position and size of its elements. Each View also provides a Painter object which paints based on the current look and feel. The Painter object renders the View using information from ViewInfo and the View's settings. Handler is another significant View object. It handles the keyboard and mouse events transmitted by the GridControl class.

Dev ComponentsDevExpress Controls for WinFormsDevExpress XtraGrid

Source of Information : 1998-2010 Developer Express Inc Help

XtraGrid Views HierarchySocialTwist Tell-a-Friend
Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

0 comments: on "XtraGrid Views Hierarchy"

Post a Comment