StreamReader sr = new StreamReader("mydb.txt"); while ((line = sr.ReadLine()) != "") { split = line.Split('\t'); lst.Add(new info { Name = split[0].ToString(), Address = split[1].ToString() }); } var btncol = new DataGridViewButtonColumn(); { btncol.HeaderText = ""; //btncol.Text = lst.Select(c => c.Name);???????? btncol.UseColumnTextForButtonValue = true; btncol.AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells; btncol.FlatStyle = FlatStyle.Flat; btncol.CellTemplate.Style.BackColor = Color.Honeydew; btncol.DisplayIndex =3; } dgv1.Columns.Add(btncol);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)