Divelements
Because every action starts with the presentation layer
SandGrid
  Home Products Downloads Store Support Corporate  
SandGrid Features
Specifications
 

Operating Systems

  • Windows 98, ME
  • Windows 2000
  • Windows XP, 2003
  • Windows Vista, 2008
  • Windows 7

Development Environments

  • Visual Studio 2005
  • Visual Studio 2008
  • Visual Studio 2010
 

SandGrid is capable of displaying data from most sources in line with the look and feel of a variety of different common controls.

All features summarised here are explained in greater detail further down the page.

  • Easily replaces the ListView, TreeView and DataGridView controls.
  • Fast sorting (both single and multi-column supported).
  • Outlook style grouping on the first level of sort.
  • Full-featured independent nested grids.
  • Use bound or unbound without sacrificing capabilities.
  • Printable including Print Preview.
  • Virtual rows bridge the gap between ease of binding and flexibility of static data.
  • Supports both row and cell level selection, with configurable highlights.
  • Optimized text display engine ensures very fast drawing.
  • Pluggable renderer support for customised drawing of common elements.
  • Editing support through an extensible editor framework.
  • Export to HTML function.
  • Grid lines in horizontal, vertical, or both directions.
  • Automatic clipboard handling.
  • Highly customizable and extensible.

Nested Grids

A result of the architecture of this product means it was easy for us to support a row type that contained another full featured grid. We were able to do this by abstracting the concept of a grid from the toplevel control that by default displays one primary grid. This design choice does not come at the expense of ease of use, however - because all properties of the primary grid are duplicated by the SandGrid toplevel control itself, if you never needed to use nested grids you wouldn't know the feature was there.

When binding to advanced data sources such as DataSets and DataViews, SandGrid is able to automatically interrogate the sources to discover information about related views and tables. This is not restricted to DataSets however - any hierarchical data source implementing the appropriate interfaces is supported.

The demonstration application included with SandGrid shows the power of nested grids by populating a DataSet with related data from the Northwind database. You can bind to any view by changing the DataMember property, and its related views are automatically discovered and made available. For instance, when binding to the Employees table one can expand each employee row to reveal a filtered list from the Orders table - orders for that employee. Further expansion of orders reveals further grids containing a list of order items. Each grid has its own selection, sorting, grouping, editing and binding facilities.

Keyboard navigation in and out of nested grids is straightforward and intuitive. One can highlight a nested grid row as you would any other, and move the selection inside it and back out again with the arrow keys. Nested grids are drawn with a soft drop shadow that distinguishes them from their background, and which changes to indicate when they have the focus.


Hierarchical Architecture

Because SandGrid was designed from the ground up to be fully hierarchical in its content, every row supports child rows. This facility for displaying data in a tree is often needed by such applications as newsreaders, for threaded views. Because support is built so deeply into the library, it does not adversely affect the speed of measuring, layout or painting operations, as is the case with competing products.

Nested rows all obey the same schema, that is the main columns in the grid. They are usually indented and have tree lines drawn to show their relationship to each other. Standard expand and collapse buttons are drawn and the usual mouse and keyboard commands work as expected.

SandGrid rows support a ContentsUnknown property for hierarchical data, to be used when it is unknown whether a row contains any children. Upon the first expansion of the row the developer can run code to determine this and populate the row. With other products this is usually achieved by adding a placeholder row as a child of the first, but SandGrid makes this a great deal more elegant. This facility is ideal for Explorer-like applications and is used internally for delayed loading of hierarchical DataViews.

Support for trees of items comes with a useful side effect - the grid can be used as a replacement for the standard TreeView control when set up with a single autosizing column and tree lines and buttons. The advantages to using SandGrid as a replacement for the TreeView are numerous, and include custom sorting (even grouping), custom drawing, different editor types and advanced extensibility.


Row Features

As containers for the actual data being displayed, the rows are the key to data manipulation and layout in SandGrid. They can be bound to items within a bound data source, they can contain cells which contain data, or they can retrieve data from elsewhere.

There are many display enhancements available for rows. Grid lines can be turned on in horizontal, vertical or both directions. Shading can be applied to alternate rows to increase readability for complex data. Tree lines and buttons can be shown when nested rows will be used. When a highlight needs to be drawn for selection, it can be applied to the entire row, a partial row (like ListViews) or to just the contents of the primary column. This variety of styles allows the grid to function like virtually every kind of list control there is.

Rows are, of course, highly extensible. One can write a simple row extension that is designed to convert a business object in to data for display and sorting. Called "Virtual Rows", this feature is shown off in the demonstration application and is a great way to show your data without suffering the loss of flexibility that is sometimes associated with data binding. Virtual rows pull data straight from your application as needed, including images and other row characteristics.

Taking control of the drawing of rows and data is easy. When you subclass a row you can take full control of mouse interaction and painting. The screenshot to the right is taken from the demonstration application, where ownerdrawing has been used to draw a subject line for each message below the normal data.

Row headers can be turned on, and they show glyphs to indicate the current row, edit operations and rows with errors. Clicking and dragging on a row can initiate a multi-select operation or it can reorder rows. Rows can also be resized by dragging their grippers in the same way as columns.


Column Features

SandGrid column objects are the key to transforming data from rows and displaying it to the user. They also control how data is edited, and present many controls to the user for interaction and customization. A number of column types are included with the product along with the ability to create your own. They include:

  • GridIntegerColumn
    Designed to display and sort integer values. A standard numeric format string can be used to format its output.
  • GridProgressBarColumn
    Extends the integer column to display output as a progress between two fixed values.
  • GridForeignKeyColumn
    For use when binding to a DataSet, formats values by finding a corresponding friendly value in a related table by looking up a matching primary key. When editing, displays a dropdown list of values in the primary key table to choose from.
  • GridBooleanColumn
    Offers a friendly Yes/No display of boolean values, and also the option of using a visual check mark instead of text.
  • GridConditionalImageColumn
    Displays one of two images depending on whether the underlying value in a cell is true or false.

Column headers themselves can contain text and images, with a choice of alignments that conform to the normal locale settings. The current sort column indicates that it is reponsible for sorting data by shading its background and by drawing a glyph to indicate the sort direction. When a multi-column sort is in operation every column involved in the sort shows a glyph.

Clicking and dragging on a column header can do one of two things - it can sort and reorder, or it can select the column contents. Sorting and reordering is typically used in ListView and DataGridView style displays where the order of the columns does not matter and the user will want to customize their layout. Selecting columns would be used in spreadsheet scenarious where order should not be changed, sorting is not appropriate but ranges of columns need to be selected for various operations. Double clicking a resize grip will cause the column to assume a size appropriate for its contents.

Most applications that present data with columns also allow the user to manipulate them in various ways. By default the user is allowed to resize columns and move them around, and your software may also present a means of controlling column visibility, perhaps with a context menu or customization dialog. This presents a problem - how to ensure a user's preferences are persisted from one run of your application to the next? SandGrid offers state serialization to address this problem, making it easy to persist the state of any grid through two methods, which operate on a string containing XML describing column state.


Pluggable Renderers

Like our other products, SandGrid abstracts most of its rendering functions into a separate, pluggable renderer interface. This way the renderer can safely be updated without affecting the rest of the product, and developers can customize the drawing of grids either by inheriting one of the renderers that ships with the product or by writing their own from scratch.

We supply renderers with the product that match the visual style of Windows and Office 2007.

The renderers shipped with SandGrid fully support high contrast and other unusual display modes. This is vital to ensure your application can be used by a broad spectrum of people, including those with reading difficulties. In fact in order to qualify for the "Designed for Windows" logo your application must comply with these display modes. Shown on the right is the Spreadsheet demonstration in the sample application running under high contrast.

GDI+ is used for all the drawing in SandGrid, making it very easy to customize and extend. If you use SandGrid for .NET 2.0, it will use GDI text rendering enhanced with our own text display engine, which brings a significant performance gain over competing products or using the default text rendering classes. This optimization brings very fast painting speed, with no lag even when rapidly scrolling large amounts of data - and GDI text rendering ensures the greatest accuracy and compatibility of typography.

The renderer in use can be configured at design time. We ship a Windows XP styled renderer with the product which exposes properties such as the color with which to draw shaded rows, and whether to draw drop shadows.


Next: Screenshots

Copyright © 2003 - 2009 Divelements Limited       About | Contact | Privacy