GrapeCity MultiRow Windows Forms Documentation
LinkLabelCell Class
Members  Example 


Represents a Cell that contains a hyperlink.
Object Model
LinkLabelCell ClassGcMultiRow ClassCellStyle ClassCellNote ClassSection ClassCellStyle ClassMultiRowTouchToolBar ClassValidatorCollection ClassCellValidator Class
Syntax
<ToolboxItemFilterAttribute(FilterString="GrapeCity.Win.MultiRow.Template7", FilterType=ToolboxItemFilterType.Custom Or  _
    ToolboxItemFilterType.Prevent Or  _
    ToolboxItemFilterType.Require)>
<FeatureAttribute(Name="LinkLabelCell", Version="v5.0")>
<ToolboxBitmapAttribute()>
<SRDescriptionAttribute("Displays a label that supports a hyperlink function.")>
<DesignerAttribute(DesignerBaseTypeName="System.ComponentModel.Design.IDesigner", DesignerTypeName="GrapeCity.Win.MultiRow.Design.DataFieldCellDesigner,GrapeCity.Win.MultiRow.Design, Version=7.20.20141.0, Culture=neutral, PublicKeyToken=0f7a722ee3c2bdd9")>
Public Class LinkLabelCell 
   Inherits LabelCell
Dim instance As LinkLabelCell
[ToolboxItemFilter(FilterString="GrapeCity.Win.MultiRow.Template7", FilterType=ToolboxItemFilterType.Custom | 
    ToolboxItemFilterType.Prevent | 
    ToolboxItemFilterType.Require)]
[Feature(Name="LinkLabelCell", Version="v5.0")]
[ToolboxBitmap()]
[SRDescription("Displays a label that supports a hyperlink function.")]
[Designer(DesignerBaseTypeName="System.ComponentModel.Design.IDesigner", DesignerTypeName="GrapeCity.Win.MultiRow.Design.DataFieldCellDesigner,GrapeCity.Win.MultiRow.Design, Version=7.20.20141.0, Culture=neutral, PublicKeyToken=0f7a722ee3c2bdd9")]
public class LinkLabelCell : LabelCell 
Example
The following code example shows how to use a link label cell and customize the properties of this cell.
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Data;
using System.Diagnostics;

namespace GrapeCity.Win.MultiRow.SampleCode
{
    public class LinkLabelCellDemo : Form
    {
        private GcMultiRow gcMultiRow1 = new GcMultiRow();

        public LinkLabelCellDemo()
        {
            this.Text = "LinkLabelCell Demo";
            this.Size = new Size(550, 300);

            // Add MultiRow to form
            this.gcMultiRow1.Dock = DockStyle.Fill;
            this.Controls.Add(this.gcMultiRow1);

            this.Load += new EventHandler(Form1_Load);
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            // create a template with LinkLabel cell.
            TextBoxCell nameTextBox = new TextBoxCell();
            LinkLabelCell addressLinkLabelCell = CreateAddressLinkLabelCell();

            Cell[] cells = new Cell[] { nameTextBox, addressLinkLabelCell };

            Template template1 = Template.CreateGridTemplate(cells);

            this.gcMultiRow1.Template = template1;

            this.gcMultiRow1.ColumnHeaders[0][0].Value = "Name";
            this.gcMultiRow1.ColumnHeaders[0][1].Value = "Link Address";

            this.gcMultiRow1.CellClick+=new EventHandler<CellEventArgs>(gcMultiRow1_CellClick);

            this.FillValue();
        }
Imports System
Imports System.Drawing
Imports System.Windows.Forms
Imports System.Data
Imports System.Diagnostics
Imports GrapeCity.Win.MultiRow

Public Class LinkLabelCellDemo
    Inherits Form
    Friend WithEvents gcMultiRow1 As New GcMultiRow()

    Public Sub New()
        Me.Text = "LinkLabelCell Demo"
        Me.Size = New Size(550, 300)

        ' Add MultiRow to form
        Me.gcMultiRow1.Dock = DockStyle.Fill
        Me.Controls.Add(Me.gcMultiRow1)
    End Sub

    Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
        ' create a template with LinkLabel cell.
        Dim nameTextBox As New TextBoxCell()
        Dim addressLinkLabelCell As LinkLabelCell = CreateAddressLinkLabelCell()

        Dim cells As Cell() = New Cell() {nameTextBox, addressLinkLabelCell}

        Dim template1 As Template = Template.CreateGridTemplate(cells)

        Me.gcMultiRow1.Template = template1

        Me.gcMultiRow1.ColumnHeaders(0)(0).Value = "Name"
        Me.gcMultiRow1.ColumnHeaders(0)(1).Value = "Link Address"

        Me.FillValue()
    End Sub
Inheritance Hierarchy

System.Object
   System.MarshalByRefObject
      System.ComponentModel.Component
         GrapeCity.Win.MultiRow.Cell
            GrapeCity.Win.MultiRow.LabelCell
               GrapeCity.Win.MultiRow.LinkLabelCell

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

LinkLabelCell Members
GrapeCity.Win.MultiRow Namespace
LabelCell Class

 

 


Copyright © GrapeCity, inc. All rights reserved.