DataGrid is an advanced, data aware WinForm control. It displays the contents of a list in a grid. Each row displays the data of a list item, and each column dedicated to displaying the value of a particular list item member.

DataGrid is easy to use thanks to the sophisticated custom designer. It is also extremely flexible with regard to the formatting and presentation of the data.

Using the custom designer it is possible to very quickly link a grid column to a DataColumn of a DataTable in either a DataSet or DataView. More generally it is possible to link a column to a public property of an object. These objects accessible via an IList interface.

Use the DataGrid as the central data management and navigation tool in your applications. Manage application data using in-place editing. Sort and search the data from within the grid. The perfect companion for the other ICreate components, why not supercharge your toolbox with InputPanel, DataGrid and Panel.

Bound columns

Using the custom designer you can link grid columns to the columns of a data table accessible via a DataSet or a DataView. Alternately link columns to the public properties of the objects accessible via an IList interface.

The designer lists all possible data sources for the grid. These can be components sited on the same form as the DataGrid or obtained by probing assemblies.

DataGrid supports client-server developents using the .net DataSet and n-tier developments using the PresentationClass and PresentationList custom attributes.

Lookup columns

When displaying relational data from a table the situation will often arise where you have a foreign key, but you do not wish to display the foreign key in the grid. You would rather display some other column of the related table. DataGrid supports these situations using lookup columns.

Using the custom designer you can identify the related table used to perform the lookup. You also specify the value and display members of the lookup table. The display member, as its name suggests, is displayed in the column, the value member is compared with the original column value in order to locate the particular entry in the lookup list.

The usual formatting, including custom formatting, can be applied to lookup columns.

Calculated columns

Some data cannot be obtained directly from the data source. The data is dependant on the list item, but the value must be calculated or possibly even obtained from some external source. DataGrid caters for such situations. Add a calculated column to the grid, implement a CalculateColumnHandler to calculate the value of the cells and attach the handler to the CalculateColumn event of the grid.

Owner-drawn columns

DataGrid provides flexible formatting options for its columns. You can select one of the predefined formats, select the default format and specify a format string or use custom formatting. With custom formatting, the formatting of the data is implemented in code. If these features are still not sufficient for your requirements then you can render then content of the cells in a column yourself, in code using owner-drawn columns.

Add an owner-drawn column to the grid, implement an OwnerDrawnColumnHandler that render the content of the cell to the region of the grid specified. Attach the handler to the DrawCell event of the grid.

Styles and hot-tracking

A style template describes a gradient filled background and border. There are templates assigned to odd rows, even rows, columns, caption panel, caption cells and data cells. By modifying the template parameters you can come up with an endless number of appearances for DataGrid.

A state template describes how a style template is modified. States templates are used to indicate many situations including hot-tracking. There are state templates for the situation where the mouse pointer is on the caption panel, in a caption cell, in a row, in a column and in a cell.

Sorting and Filtering

Sort the grid based on the content of a column. You can also filter the grid based on the content of a column. Specify the filter expression using the default filter popup window or implement your own filter user interface. The filter expression can be a single value or a range of values. All rows that meet the filter criteria are listed in the grid.

Cell highlighting

Allow the user to easily analyse the data displayed in the grid by highlighting cells based on their content. Highlight the cell by specifying a highlight expression or implement a HighlightCellHandler to determine if a cell should be highlighted and to specify the state template that specifies the colours used to highlight the cell. Attach the handler to the HighlightCell event of the grid.

In-place editing

Insert, modify and delete list items using DataGrid. Using the custom designer you can specify which columns may be modified as well as the type of control used to modify the cell content. DataGrid directly supports most of the standard controls. It is however possible to use any control.

Validation

Define validation conditions for the columns. These conditions include minimum and maximum character length and minimum and maximum value. You can also specify the conditions under which a column is mandatory and enabled. These conditions can contain column values. This allows you to include in the validation conditions any relationships that exist between columns.

Field status display

Help the user fill out the form by clearly indicating which columns are required, which columns currently contain valid data, and which contain invalid data. You can do this by modifying the colour of the controls and the cells containing the controls. Use the state templates to specify this change in colouring.

Tips and messages

No one has the time to read large user-manuals cover-to-cover. People want concise, relevant information to help them with the task at hand. DataGrid has build-in support for help so that you can provide this concise relevant information to your users.

The grid has a number of channels for help messages: standard ToolTips, enhanced ToolTips, Label text and StatusPanel text.

Reduce your workload by automating your help messages. Help messages can include column values, the value of column properties and date time format information.

When users do get it wrong, send helpful error messages to them down the same channels. These messages can be defined with the validation conditions.

Custom designer

Use the sophisticated custom designer to design and configure the instances of DataGrid