在我的初始加载时,我的第一条记录没有将数据从table2加载到我的表单(DataBinded TextBoxes)。如果我导航到第二个并返回到第一个加载。有什么想法吗?
public partial class myForm : Form
{
public int bindingPosition {get; set;}
private void myForm_Load(object sender, EventArgs e)
{
this.tableAdapter1.Fill(this.myDataSet.Table1);
this.tableAdapter2.Fill(this.myDataSet.Table2);
}
if (bindingPosition >=0)
{
//Navigates to specific record if bindingPosition variable is set
//set by passing Convert.ToInt32(BindingNavigator.PositionItem.Text) from another form
myBindingSource.Position = (bindingPosition -1);
}
myBindingNavigator_RefreshItems(sender,e);
}