Hi all, my problem is that when I use the following code and then increment the Position property in BindingSource by using a nextButton (see below), the records in the textbox’s don’t update to the next record in the DataTable?
On Load
Next Button Click
I thought that this would update the textboxes?
What am I doing wrong? Any help Appreciated, thx T
Age is a consequence of experience
On Load
Code:
// this displays the first record :)
this.personTableBindingSource.DataSource = dtPerson; //DataTable
this.textboxPersonID.DataBindings.Add("Text", dtPerson, "PersonID");
this.textboxFirstname.DataBindings.Add("Text", dtPerson, "FirstName");
this.textboxLastname.DataBindings.Add("Text", dtPerson, "LastName");
Next Button Click
Code:
if (this.personTableBindingSource.Position < this.personTableBindingSource.Count - 1)
{
// I get Here but no update happens
// in Textboxes? I thought textboxes
// would show 2nd record in DT but no change?
this.personTableBindingSource.Position += 1;
}
What am I doing wrong? Any help Appreciated, thx T
Age is a consequence of experience