DataGridView删除多行

foreach (DataGridViewRow r in dgvUpdate.SelectedRows)
            {
                for (int i = 0; i < dgvUpdate.SelectedRows.Count; i++)
                {
                    string datatime = dgvUpdate[10, dgvUpdate.SelectedRows[i].Index].Value.ToString();
                    M.时间 = datatime;
                    MoneycountsBLL.DeleteData(M);
                }
            }

你可能感兴趣的:(datagridview)