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

Xceed Support
Member
Post count: 5658

Hi Morgan,

Find next an implementation of LinkLabel as CellViewerManager in the Xceed Grid for .NET:

LinkLabel label = new LinkLabel();

            starterGrid.Columns[ “ProductName” ].CellViewerManager = new CellViewerManager( label, “Text” );

            starterGrid.Columns[ “ProductName” ].ReadOnly = true;

starterGrid.DataRowTemplate.Cells[ “ProductName” ].Click += new EventHandler( StarterGrid_Click );

void StarterGrid_Click( object sender, EventArgs e )

        {

            DataCell cell = sender as DataCell;

 

 

            if( cell.CellViewerManager.Control.GetType() == typeof( LinkLabel ) )

            {

                LinkLabel label = cell.CellViewerManager.Control as LinkLabel;

                // Specify that the link was visited.

                label.LinkVisited = true;

                // Navigate to a URL.

                System.Diagnostics.Process.Start( http://www.xceed.com” );

            }

        }

..

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