如何在datagridview中选中复选框时为动态创建的复选框编写函数

时间:2012-08-01 11:26:52

标签: c# c#-4.0 datagridview

如何编写函数以在选中复选框时获取行的值。我正在使用下面的代码

动态创建复选框列
DataGridViewCheckBoxColumn checkColumn = new DataGridViewCheckBoxColumn();
checkColumn.Name = "X";
checkColumn.HeaderText = "Select";
checkColumn.Width = 50;
checkColumn.ReadOnly = false;
checkColumn.FillWeight = 10; //if the datagridview is resized (on form resize) the checkbox won't take up too much; value is relative to the other columns' fill values
dataGridView5.Columns.Add(checkColumn);

如何编写check column函数来获取所选的行值。

0 个答案:

没有答案