Home Forums WinForms controls Xceed Grid for WinForms Hyperlink column Reply To: Hyperlink column

Xceed Support
Member
Post count: 5658

Hi,

Since the CellViewManager’s LinkLabel control is recycled on the containers of your view, changing its LinkVisited property state will affect all the cells that use it.

The solution for your scenario is to create another Boolean field in your data item that will contain the LinkVisited state. This field will, of course, be hidden on the view.

Then, you will handle the SettingControlAppearance event on your CellViewerManager. This even is raised when the appearance of the underlining control is about to be set.

You will have access to the Cell and Control parameters. Using the Cell you could have access to the underlying object via the SourceObject property. That Data Item’s VisitedLink field would be updated within a Click event handler.

Then using the Control object, you could cast it into a LinkLabel and then set its LinkVisited property to the VisistedLink field’s value.

The above should ensure that only the click that you have visited would be purple.  

Imported from legacy forums. Posted by Mohamed [Xceed] (had 1065 views)