Работа c BindingNavigator
Код:
private void setBsnav()
{
bs = new BindingSource();
bs.DataSource = ds.Tables[0];
bsnav.BindingSource = bs;
}
private void bindingNavigatorSaveItem_Click(object sender, EventArgs e)
{
da.Update(ds.Tables[0]);
}
private void bindingNavigatorDeleteItem_Click(object sender, EventArgs e)
{
da.Update(ds.Tables[0]);
}
private void bindingNavigatorMoveNextItem_Click(object sender, EventArgs e)
{
bs.MoveNext();
}
private void bindingNavigatorMovePreviousItem_Click(object sender, EventArgs e)
{
bs.MovePrevious();
}
private void bindingNavigatorMoveFirstItem_Click(object sender, EventArgs e)
{
bs.MoveFirst();
}
private void bindingNavigatorMoveLastItem_Click(object sender, EventArgs e)
{
bs.MoveLast();
}
{
bs = new BindingSource();
bs.DataSource = ds.Tables[0];
bsnav.BindingSource = bs;
}
private void bindingNavigatorSaveItem_Click(object sender, EventArgs e)
{
da.Update(ds.Tables[0]);
}
private void bindingNavigatorDeleteItem_Click(object sender, EventArgs e)
{
da.Update(ds.Tables[0]);
}
private void bindingNavigatorMoveNextItem_Click(object sender, EventArgs e)
{
bs.MoveNext();
}
private void bindingNavigatorMovePreviousItem_Click(object sender, EventArgs e)
{
bs.MovePrevious();
}
private void bindingNavigatorMoveFirstItem_Click(object sender, EventArgs e)
{
bs.MoveFirst();
}
private void bindingNavigatorMoveLastItem_Click(object sender, EventArgs e)
{
bs.MoveLast();
}