using System.Windows.Forms; DataGridViewButtonColumn column3 = new DataGridViewButtonColumn(); column3.Name = "欄位名稱"; column3.UseColumnTextForButtonValue = true; column3.Text = "按鈕名稱"; column3.Width = 30; DataGridView1.Rows.Add(column3);新增按鈕跟資料
int Count = DataGridView1.Rows.Count - 2; DataGridView1.Rows[Count].Cells[1].Value = "值";
沒有留言:
張貼留言