General information
Title:
Detecting TabControl/TabPage change of page
I have an example program I'm building as a learning tool. It uses the employee table and the orders table of the Northwind database. It has textboxes, navigation control, a tabcontrol (with 2 pages). The first page of the tabcontrol has a DataGrid on it which shows the orders records associated with the current employee selected via the navigation controls. The second page othe the tabcontrol contains textboxes which display the fields from the current employee record selected via the navigation controls.
For discussion lets say the employee record currently selected is #5.
The information from the orders table, displayed in the datagrid on page1 shows the right information.
I have noticed that when I change from page1 to page2 the employee information being shown is for the 1st employee record...not for the 5th employee.
If I navigate to the NEXT record the employee information being shown on page2 is for the 6th employee record...the correct record.
If I change from page2 to page1 the information from the orders table, displayed in the datagrid on page1 shows the right information.
If I change from page1 back to page2 the employee information being shown is for the 1st employee record...not for the 6th employee.
I have 2 questions:
Can anyone tell me how I can detect the page change?
Can anyone tell me how I can stop this incorrect behavior?
Thanks,
Rick
--------------------------------
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only