private void button9_Click(object sender, EventArgs e)//下一条记录按钮
{
if (dataGridView1.CurrentCell.RowIndex != dataGridView1.RowCount - 1)
{
this.dataGridView1.CurrentCell = this.dataGridView1;
}
else
{
MessageBox.Show("已到达末记录","警告",MessageBoxButtons.OK,MessageBoxIcon.Information);
}
}
private void button10_Click(object sender, EventArgs e)//上一条记录按钮
{
if (dataGridView1.CurrentCell.RowIndex != 0)
{
this.dataGridView1.CurrentCell = this.dataGridView1;
}
else
{
MessageBox.Show("已到达首记录", "警告", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}