Question Help:How to put a Click Event on a newly added DataGridViewLinkColumn on my Datagrid

t_jcruise

Member
Joined
Jul 16, 2010
Messages
10
Programming Experience
Beginner
Here is my code.

VB.NET:
        With dgvBrowseTeacher
            .AutoGenerateColumns = False
            .ReadOnly = True
            .AlternatingRowsDefaultCellStyle.BackColor = SystemColors.Info
            .SelectionMode = DataGridViewSelectionMode.FullRowSelect

           
            Dim TeacherName As New DataGridViewLinkColumn
            With TeacherName
                .DataPropertyName = "TeacherName"
                .Name = "TeacherName"
                .HeaderText = "Teacher Name"
                .Width = 230
            End With
            .Columns.Add(TeacherName)
        End With


If i Click the cell data which is a LinkLabel I want to display a message.I wanted to access the click event of that Linkcolum as per cell data. how will i do this... I could only access the click event of the datagrid. Help please thanks...
 
Back
Top