Divelements
Because everything starts with the presentation layer
SandGrid
 Tuesday, December 18, 2007, 1:13 AM   Home Products How to Buy Store Support Corporate  
SandGrid Columns
Home / Products / SandGrid

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 locate 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.

Read More

Design and content Copyright © 2003 - 2007 Divelements Limited. Content may not be reproduced without permission.