MobileForms Toolkit Documentation

SmartGrid Class

Resco SmartGrid control.

For a list of all members of this type, see SmartGrid Members.

System.Object
   System.MarshalByRefObject
      System.ComponentModel.Component
         System.Windows.Forms.Control
            Resco.Controls.SmartGrid.SmartGrid

public class SmartGrid : Control

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Resco SmartGrid control is designed for displaying your data in a stylish, colorful grid, containing various images.

The grid constists of cells that are created based on data defined in rows and layout defined in columns. Cells collection gives you access to every displayed Cell. Cell can give you access to its location, row, column, style and data. It is possible to create customizable cells in specific columns by setting CustomizeCells to true and handling the CustomizeCell event. Cell can have four states: normal, alternating, selected and header cell. Normal and alternating cells are basic cells in data rows according to row index. Cell become selected when it is clicked, or when FullRowSelect is true and cell is in selected row. Header cells are in row headers when RowHeadersVisible is true and in column headers when ColumnHeadersVisible is true.

Rows collection gives you access to Row containing data to display in grid. The data can be filled in either using DataSource and standard databinding mechanism, or you can use optimised direct access to database using DbConnector with DelayLoad option. Another possibility is to fill in the grid manualy by adding or inserting rows to rows collection.

Columns collection gives you access to Column containing definitions how to display specific column in grid. It is possible to specify ImageList as a source of images for column. You can also specify which custom styles to use for the specific column.

Custom styles are stored in Styles collection. They are referenced by its name and are used to override default values of colors, fonts, alignment and image positioning for the specific column and cell type.

SmartGrid defines standard Font, HeaderFont and various colors used to display cells and grid. To customize display you can use also properies Border, GridLines, ColumnHeadersVisible, ColumnHeaderHeight, RowHeadersVisible and RowHeaderWidth.

You can farther control behavior of SmartGrid using properties AllowResize and FullRowSelect.

The control can be scrolled either by user or programatically using ScrollHPos and ScrollVPos properties. Scrolling is discrete. Scroll event is fired everytime contents are scrolled. You can dock specified number of rows and columns (preventing to scroll them) by setting DockedRows and DockedColumns properties.

The selection is controlled using ActivateCell method. When cell is activated and is not selected, then SelectionChanged event is fired and ActiveRowIndex and ActiveColumnIndex are updated.

You can use method LoadXml to load a saved XML templates of the grid. To create the templates you can use Designer in Profesional edition of control or method SaveXml on desktop.

Requirements

Namespace: Resco.Controls.SmartGrid

Assembly: Resco.SmartGrid.CF3 (in Resco.SmartGrid.CF3.dll)

See Also

SmartGrid Members | Resco.Controls.SmartGrid Namespace