iGrid Control - Distinctive Features

1. Unbound grid

iGrid works mainly in unbound mode as it was designed as an advanced editable replacement for such standard VB controls as ListView and FlexGrid (though, of course, it allows you to browse and edit ADO and DAO recordsets). Some well-known grids boast an incredibly simple "array binding" feature. In one line of code, you can bind a two-dimensional array directly to such a grid, and all the changes made in the grid are reflected immediately in the array and vice versa.

In iGrid, you even don't need to create an array for that – just set the required number of rows and columns, and you can already use this array to store and display your data. You access each cell of the array (or iGrid - no matter) using a CellValue property indexed by row and column numbers like in a traditional two-dimensional array. iGrid also automatically redimensions this array when you are adding or removing rows or columns.

2. Cell value and cell text

Each cell in iGrid has a cell value and its text representation on the screen. The cell value is accessible through the CellValue property of the Variant data type. Thus, you can store values of any types in iGrid cells. This allows you to even store values of different data types within the same column:

Values of different types in the same column

The text representation may differ from the cell value a lot. It can be formatted using a Visual Basic predefined string, numeric or date format like in the VB Format function, or you can even define your own formatting or conversion algorithm (for instance, cell value stores a numeric unique id of an object, but on the screen it is displayed as the object's name retrieved dynamically from another source). This is very useful - you work with your data in their native format while the user sees them on the screen in a handy representation.

3. Tree grid

The rows can have hierarchical structure, i.e. you can have nested rows. One of the columns can be set as tree column, and it will display the master-detail relations between your rows (also called tree grid):

Tree grid example (nested rows)

You just need to specify the nesting level for each row, and iGrid will maintain this structure automatically (displays the plus/minus tree buttons, allows the user to collapse or expand rows, etc). And you can even sort your tree grid keeping the tree structure!

4. Total control over editing

iGrid has its own set of events which allow you to control the data entered by the user. Among them are RequestEdit, BeforeCommitEdit, AfterCommitEdit and CancelEdit, and they all can be used with any built-in in-place editors (textbox, combobox and checkbox). This set of events allows fine tuning of the editing process.

You can also use specific events for the textbox editing feature - TextEditChange, TextEditKeyPress, TextEditKeyDown and TextEditKeyUp. These events work like the standard events for VB TextBox and allow sophisticated tuning of textbox editing.

5. Cell icon placement freedom

In our grid each cell can display its own icon and optional extra icon. You can specify the place where the cell icons are displayed (to the left, right, top or bottom of the cell text), and also any vertical and horizontal alignment for the whole cell contents:

Cell icon placement options

Add to this the ability to use images from 15 different image lists (of different image properties, such as width and height) as cell icons.

6. Available cell formatting options

In iGrid you can format each cell individually using one or all of the following options:

  • Set background and foreground colors.
  • Each cell can have its own font.
  • Cell icons can optionally be highlighted when selected.
  • Many cell text formatting options. A cell text can be aligned horizontally or vertically; it can appear on a single line or multiple lines; the text can appear with a trailing ellipsis (...) if the cell text is wider than the cell boundaries.
  • Cells can be indented using individual left/right/top/bottom indent values.
  • Cells can be included or excluded from the selection box for a row.
  • The value of a cell may be formatted using format strings from the standard VB Format function.

The screenshot below illustrates how you can use these formatting options:

Cell formatting (foreground/background colors, font, selection, multiline text)

7. Sort types and multi-column sorting

The contents of iGrid can be sorted by several columns simultaneously based on a wide range of sort criteria (cell value, cell text disregarding character case, cell icon or extra icon, selection, cell text indentation, cell foreground or background color, etc - or even you can define your own sort rules).

The important thing is that when you sort iGrid by several columns, the control can mark the sorted columns by numerated sort icons to help you to understand which columns are sorted first:

Multi-column sort in ActiveX grid

8. Useful methods to automate important everyday tasks

Our ActiveX grid provides you with a lot of methods and properties to automate common tasks or which allow you to adjust the view of iGrid to your needs. Among them are:

  • The LayoutCol and LayoutSort properties which allow you to save and restore the grid layout (the width of each column, their position and visibility) and the sort criteria the user has set. You can do it in only one line of code with these properties!
  • The row height can be automatically calculated based on the contents of the cells using the AutoHeightRow method. The AutoWidthCol method allows you to auto fit the column width.
  • The built-in comboboxes have similar methods. The SetHeightInItems method allows you to adjust the number of visible items in the drop-down part of a combo, and the AutoAdjustWidth method automatically adjusts the dropdown list width based on the longest text width of comboitems.

9. Virtual mode and effective memory management

iGrid supports virtual mode when it requests new rows whenever they need to be displayed. This allows you to add rows as they are required and dramatically speed up your apps if you need say to browse remote data sets when the time to retrieve data is sensible. iGrid's virtual mode is smart - the rows are requested only once and remain in the memory the whole grid lifetime.

iGrid allocates memory for its data using the technology of dynamic pages, and it has its own memory manager you can change the parameters of to optimize these operations. It enables you to reduce the time taken to add rows to huge grids by up to ten times.

10. Property grid emulation

You can combine all the iGrid features to create a powerful grid interface. One of good examples of this is a so called PropertyGrid control. Below is a screenshot of the Property Editor demo written with the help of our iGrid:

PropertyGrid demo for 10Tec ActiveX grid control

Discover other features in 10Tec ActiveX Grid Control Tour »