c#中的bindingNavigator

来源:百度知道 编辑:UC知道 时间:2024/05/31 05:52:09
bindingNavigator中有显示上一条下一条的按钮,想要用一个BUTTON来代替这样的效果,应该如何实现呢?

比如:bindingNavigator1.BindingSource=BindingSource1;

bindingNavigator中的按钮事件
private void toolStripButton1_Click(object sender, EventArgs e)
{
try
{
this.BindingSource1.MoveFirst //第一条
//this.BindingSource1.MoveLast //最后一条
//this.BindingSource1.MoveNext //下一条
//this.BindingSource1.MovePrevious;//上一条
}
catch (Exception E)
{
MessageBox.Show("错误:" + E.Message);
}
}