全选
private void All_selected_Click(object sender, EventArgs e)
{
for (int i = ; i < this.DataGridViewProduct.Rows.Count; i++)
{
if (DataGridViewProduct.Rows[i].Cells["Check"].EditedFormattedValue.ToString().ToLower()=="false")
{
DataGridViewProduct.Rows[i].Cells["Check"].Value = "True";
}
}
}
取消
public void AllCancel()
{
foreach (DataGridViewRow row in DataGridViewProduct.Rows)
{
row.Selected = false;
}
}