Link to home
Start Free TrialLog in
Avatar of 1jaws
1jawsFlag for United States of America

asked on

tabstrip validation

I am using telerik tabstip that I set the causesvalidation = true for the tabs , what it happens, when I go forward withought entering required fields my validation required fields fires up and not let me go forward so it is good, but if I go all the way last tab that time and want to come back and change something on the first tab , validation not firing that time if I take out something and leave for ex, firstname textbox empty,,, because orginaly if was not empty maybe thats why?
Avatar of sunithnair
sunithnair

Set a validationgroup for your validationcontrols and controls to validate
Avatar of 1jaws

ASKER

i do have that validationcontrols for my each pageview
Avatar of 1jaws

ASKER

thats why it is ok validation works forward, but it you clcik on previous tabs and change somehing leave textbox empy for example, it is not validating that time..
Avatar of 1jaws

ASKER

on step 1  txtfirstname, txtlastname and two required field validators for them.

2 step txtcredti card number

3 step something else textboxes.

what happens first time if I dont fill the 1 step textboxes validation code works, then I go next step fill those credit card textbox fields then go to 3 step right, When On step 3, I decided to go back to Step 1 and changed my lastname to (nothing) empty and clcik back on the Step2 tab, it does lets me even though lastname field is empty...
<telerik:RadTabStrip ID="radTabs" runat="server" 
    MultiPageID="radPages"     SelectedIndex="0"    
    causesvalidation="true"> 
 
 
 
 
    <Tabs> 
 
 
 
 
    <telerik:RadTab runat="server" Text="Step 1"  >
    </telerik:RadTab> 
 
 
 
 
        <telerik:RadTab runat="server" Text="Step 2" >
        </telerik:RadTab> 
 
 
 
 
        <telerik:RadTab runat="server" Text="Step 3" >
        </telerik:RadTab>
 
    </Tabs>
</telerik:RadTabStrip> 

Open in new window

Avatar of 1jaws

ASKER

I added validationgroup to tabstrip, it works if I had one just vg1 for all, but since Ihave three different validationgroup I dont know how to set that up, each view has own validationgroup vg1, vg2, vg3
Have you tried setting the ValidationGroup as I mentioned earlier and shown in this example http://demos.telerik.com/aspnet/TabStrip/Examples/ASPNET2/ValidationGroup/DefaultCS.aspx. This example has almost the same scenario as yours and it works fine.
Avatar of 1jaws

ASKER

ok, on that second tab what would be validationgroup = same as first one, because I had vg1 for first one, vg2 and vg3 .. so if I put  ValidationGroup="TabStripValidationGroup" to tabstrip what I need to do for the rest , put same thing for instead of vg2 and vg3?
 
If none of that works you could try this on the server side Page.Validate(vg1)
Avatar of 1jaws

ASKER

I have decided to turn off the steps clickable but I dont know how to do that. What I do that I set the eaach tabs to enable =  false at the begining than as I go along on the button Next I enable them by one by. But I want like this, Step1 already enable one( I did that by setting step 1 enable = true) , Step 2 and 3 is enable false. When user on step1 and hit next button goes to Step2  at that point I need step1 to be enable false , then same thing for when user goest to step3 , step 1 and step2 should be enable =false
how can I do that
ASKER CERTIFIED SOLUTION
Avatar of sunithnair
sunithnair

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of 1jaws

ASKER

thank you so much it worked..