I have a tab control with multiple tabpages. A grid has been placed on each tab with validation on some columns of each tab for data entry check. It’s like a client record having multiple deliverying addresses and multiple contact person. But, there is no relationship between deliverying addresses and contact person in anyway at all. It’s simply two sets of 1-many relationships scenario.
Now, my problem is… assume a user enters a new row on each grid but not yet added into the data row (remain in the insertion row state).
When I tries to save the record, the procedure should attempt to validate all data entries in all controls and grid controls. After that, it will “ENDEDIT” the insertion line just to submit the changes. Everything worked just fine until the time when I called EndEdit on the insertion row belonging to a grid that’s not visible.
Any idea as to why this happened? Any way to go around it? I tried to find a way to restrict a tab change event until the current grid is validated, but I failed… as the functionality of the tab control seems to be rather limited. Please shed some light on this area.
Imported from legacy forums. Posted by James (had 744 views)
Dear Andre, I think I found out the cause. As Tab control doesn’t come with a validation method before changing to a different tab, therefore, I had to keep track of which tab I am currently on by using a variable saving the tab index.
It has something to do with the logic I setup that confused the program… as a result, it failed with a NullReference error.
So far it seems to be operational. Thank you for your reply. I’ll test it out some more to see if it does fix the problem for good or not.
Imported from legacy forums. Posted by James (had 868 views)