C# 手动将按钮添加到gridview行
我只想有一个动态网格视图,每行包含3个按钮。我只想在这个网格视图中有5行。我使用这段代码将数据填充到一行中,但我不知道如何将按钮添加到每行中?有人能帮我吗C# 手动将按钮添加到gridview行,c#,winforms,datagridview,C#,Winforms,Datagridview,我只想有一个动态网格视图,每行包含3个按钮。我只想在这个网格视图中有5行。我使用这段代码将数据填充到一行中,但我不知道如何将按钮添加到每行中?有人能帮我吗 DataGridViewRow row = new DataGridViewRow(); row.CreateCells(scanImagesGrid); row.Cells[0].Value = "1"; row.Cells[1].Value = "عکس شخصی"; row.Cells[2].Value= //my button no1
DataGridViewRow row = new DataGridViewRow();
row.CreateCells(scanImagesGrid);
row.Cells[0].Value = "1";
row.Cells[1].Value = "عکس شخصی";
row.Cells[2].Value= //my button no1
row.Cells[3].Value= //my button no2
row.Cells[4].Value= //my button no4
scanImagesGrid.Rows.Add(row);
我还想知道如何响应每行中每个按钮的点击事件。
非常感谢请参考确切的问题。请阅读本文