如何编写一个函数来获取选中复选框时行的值。我正在使用以下代码动态创建复选框列
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
函数来获取选定的行值。