DataGridViewLinkColumn link = new DataGridViewLinkColumn(); link.UseColumnTextForLinkValue = true; link.HeaderText = "Click to View"; link.DataPropertyName = "lnkColumn"; link.ActiveLinkColor = Color.White; link.LinkColor = Color.Blue; link.Text = "More"; DgvregistrationList.Columns.Add(link);
private void DgvregistrationList_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == 0) { int row; //Get the row index row = e.RowIndex; View_Registration.name = DgvregistrationList.Rows[row].Cells[1].Value.ToString(); View_Registration obj = new View_Registration(); obj.ShowDialog(this); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)