iGrid Control - Distinctive Features

1. Unbound grid

iGrid works mainly in unbound mode as it was designed as an advanced editable replacement for the VB ListView and MSFlexGrid controls. 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 specify the required number of rows and columns, and you can already use the cell array to store and display your data. You access each cell of this array using the CellValue property indexed by row and column indices 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 value and its text representation on the screen. The cell value is accessible through the CellValue property of the Variant data type, allowing you to 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 significantly differ from the cell value. It can be formatted using a numeric or date format string like in the Visual Basic Format() function, or you can even define your own formatting algorithm for that. For instance, a cell value can store a numeric unique id of an object, but on the screen it will be displayed as the object's name retrieved dynamically from another source. This is very useful - you as a developer works with your data in their native format from code 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 and the like). And you can even sort your tree grid keeping the tree structure!

4. Total control over editing

iGrid has its own set of events to control the data entered by the user. Among them are RequestEdit, BeforeCommitEdit, AfterCommitEdit and CancelEdit. All these events can be used with any built-in cell 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 the VB TextBox control and allow sophisticated tuning of textbox editing.

5. Cell icon placement freedom

In iGrid every 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 set any vertical/horizontal alignment for the whole cell contents:

Cell icon alignment 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 features (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 with numerated sort icons to help you to understand which columns are sorted first:

Multi-column sort in ActiveX grid control

8. Useful methods to automate important everyday tasks

10Tec iGrid provides you with a lot of methods and properties to automate common tasks. 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 when you browse remote data when the time to retrieve them is sensible. iGrid's virtual mode is smart - the rows are requested only once and remain in the memory until you close the form with iGrid.

iGrid allocates memory for its data using the technology of dynamic pages. The control has its own memory manager with adjustable parameters to optimize these operations. This allows you to reduce the amount of time needed to add rows to huge grids by up to ten times.

10. Property grid emulation

You can combine all the iGrid features to create powerful grid-based interfaces. 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

iGrid is a top-notch VB grid control »