 ---------------------------------------------------
|                                                   |
| Hyperlink Cell Manager                            |
|                                                   |
| iGrid.NET Extra Samples                           |
| Copyright (c) 10Tec Company                       |
| All rights reserved                               |
|                                                   |
| Available editions:                               |
| >> iGrid.NET 2.5, VS2005 C#/VB.NET                |
|                                                   |
 ---------------------------------------------------

Description:
============
If you need cells which act as clickable links in iGrid.NET, you can easily do that with the Hyperlink Cell Manager class from this sample. Just attach it to the required grid, define your rule that tells the class whether a cell is a hyperlink, and all such cells will automatically become blue clickable hyperlinks.

Short Code Explanation:
=======================
The Hyperlink Cell Manager class (iGHyperlinkCellManager) is implemented in a separate file and can be easily used with your existing projects. To make it working, do the following:

1) Add the class file to your project.

2) Create a new variable of the iGHyperlinkCellManager class type on a form level.

3) Define your own event handlers for the CellIsLink and CellLinkClick events. The former determines whether a cell should be treated as hyperlink; the latter is raised by the class when the hyperlink in such a cell is clicked.

4) Attach this instance of the class to the required grid with the Attach method.

Internally iGHyperlinkCellManager does two main things. The first one is hyperlink highlighting. It is done with the help of the CellDynamicFormatting even of iGrid.NET in which the manager just analyzes whether the current cell is a hyperlink and changes its color and font if so on the fly (and thus you do not need to do any changes in the source grid).

The other important part is changing the mouse pointer to the hand icon if the cell under the pointer is a hyperlink. The iGrid.NET CellMouseEnter and CellMouseMove events are used for that.

Changes History
===============
[2009-Jun-18]
1. Two new public events, CellIsLink and CellLinkClick, were added to have an ability to easily implement custom rules to determine whether a cell is hyperlink and process the clicks on such hyperlinks without modifying the class source code.
2. Now you can select a cell with a hyperlink without clicking the hyperlink if you click an empty cell area. In the previous version it was considered a link click, and there was no chance to select such a cell without activating the hyperlink in it.
[2008-Nov-05]
Initial release.
