How to get LinkLabel control from DataGridview in Windows Forms application? Below is the code I am writing, able to get the value but not able to get the LinkLabel control.
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
string name = this.dataGridView1.Rows[e.RowIndex].Cells["Name"].ToString();
LinkLabel label; //Here I need to get the linklabel control same way like value
}
Usually, your control like LinkLabel myLinkLabel is a control that has been added to the Winform using the designer.
So, you would set myLinkLabel.Text = "some string" or a variable.
Or you could dynamically add the control to your form: