Sri Hari

Sri Hari

  • NA
  • 7
  • 4.2k

add DataGridViewLinkColumn with changing text in each row

Aug 17 2016 10:53 AM
C# windows datagridview , how to add DataGridViewLinkColumn with changing text in each row. like dynamically add link text while iterating over the rows of the datagridview.
 
tried to add the link column and change each row text,

DataGridViewLinkColumn lnk = new DataGridViewLinkColumn();
dataGridView1.Columns.Add(lnk);
lnk.HeaderText = "Link Data";
lnk.Name = "Link Data";

foreach (DataGridViewRow row in dataGridView1.Rows)
{
lnk.CellTemplate.Value = sometext;
} 

Answers (1)