• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1344
  • Last Modified:

TabContainer (AjaxControl) - How to causes validation when change tab

Hello,

I have a TabContainer, and inside, in each table, are some fields like text box and dropdowns.

When I click a tab, the event for tab changed (OnActiveTabChanged) is catched.

So, what I need is, before that event, the TabContainer needs to validate all the fields there are in the current tab, but, this component don't have any properties like "CausesValidation" (like a asp button).

So, what I miss?
0
fabiomenezes
Asked:
fabiomenezes
1 Solution
 
abelCommented:
If you do not have CausesValidation on a certain control, you can always manually use the method Validate in the beginning of the method. This will cause the same chain of validations as CausesValidation would do:

this.Validate();
If you want to validate only a particular validation group (assuming your selected tab only has a specific validation group per tab or something), you can do:

this.Validate("yourvalidationgroup");
After that, you can use this.IsValid the way you normally do.

-- Abel --
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now