Undo Tab Control Change

  • Thread starter Thread starter Turtle
  • Start date Start date
T

Turtle

I have a tab control which permits users to view a variety of data,
depending on the page selected.

However, I need to do a validation before I permit the user to move off the
current page.

The Validating event seems too late for this; if the validation is OK, I
want to display the new data immediately when the new tab is clicked. But
the Validating event doesn't fire until the user leaves the tab control by
clicking something else.

None of the other events seem to offer any sort of Cancel or Undo, so I've
been left stringing together a rather convoluted set of code, where I store
the TabControlIndex on the TabControl_GotFocus event, then return to that
index in the TabControl_SelectedIndexChanged event, causing that event to
fire another time...

Isn't there a better way out there?

TIA
- Turtle
 
Turtle,

I try to understand what you want to say.

Is it something that you want to disable the tabs until all user input on a
tabpage is validated?

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top