Hi everyone
I'm trying to perform a remarkably simple operation, and even though I've solved it using an alternative method, I was hoping someone might be able to answer this question.
I have a combobox bound to a Customer table that displays the customer codes. When I change the value in the combobox, I want to populate an unbound textbox with the Customer Name.
Now, when I change the combobox value, it does change the textbox value, but it's always one record behind. It displays the CustomerName relating to the combobox value I just changed from.
Using the Changed Index event on the combo box, I run some code such as :
No doubt there is some very obvious explanation to this, but I sure can't find it. Any help would be greatly appreciated, Thanks.
I'm trying to perform a remarkably simple operation, and even though I've solved it using an alternative method, I was hoping someone might be able to answer this question.
I have a combobox bound to a Customer table that displays the customer codes. When I change the value in the combobox, I want to populate an unbound textbox with the Customer Name.
Now, when I change the combobox value, it does change the textbox value, but it's always one record behind. It displays the CustomerName relating to the combobox value I just changed from.
Using the Changed Index event on the combo box, I run some code such as :
Dim drvRow As DataRowView
Dim drRow As DataRow
drvRow = TblCustomerBindingSource.Current
drRow = drvRow.Row
lblInfo.Text = drRow("CustomerName")
No doubt there is some very obvious explanation to this, but I sure can't find it. Any help would be greatly appreciated, Thanks.