How to make the form tab strip to work?

Hello,
Can someone help me with this?

I have vertical tab strip, multipage, using page views and I need them to display the page view when I click on them.

What I have right now is, they enable themselves as long as the submit button is clicked but if I want to go back to a previews radstrip, the tab is clickable but it does not display the page view, or the form. What attributes shouls I use.
see the cs bellow:
protected void Page_Load(object sender, EventArgs e)
 
    {
 
        RadTabStrip1.Tabs[0].Enabled = true;
 
        RadTabStrip1.Tabs[1].Enabled = false;
 
        RadTabStrip1.Tabs[2].Enabled = false;
 
        RadTabStrip1.Tabs[3].Enabled = false;
 
        RadTabStrip1.Tabs[4].Enabled = false;
 
        PageView1.Focus();
 
          
 
    }
 
    protected void Button1_Click(object sender, EventArgs e)
 
    {
 
        RadTabStrip1.Tabs[0].Enabled = true;
 
        RadTabStrip1.Tabs[1].Enabled = true;
 
        RadMultiPage1.SelectedIndex = 1;
 
        RadTabStrip1.SelectedIndex = 1;
 
        PageView2.Focus();
 
    }
 
    protected void Button3_Click(object sender, EventArgs e)
 
    {
 
        RadTabStrip1.Tabs[0].Enabled = true;
 
        RadTabStrip1.Tabs[1].Enabled = true;
 
        RadTabStrip1.Tabs[2].Enabled = true;
 
        RadMultiPage1.SelectedIndex = 2;
 
        RadTabStrip1.SelectedIndex = 2;
 
        PageView3.Focus();
 
    }
 
 
 
    protected void Button5_Click(object sender, EventArgs e)
 
    {
 
        RadTabStrip1.Tabs[0].Enabled = true;
 
        RadTabStrip1.Tabs[1].Enabled = true;
 
        RadTabStrip1.Tabs[2].Enabled = true;
 
        RadTabStrip1.Tabs[3].Enabled = true;
 
        RadMultiPage1.SelectedIndex = 3;
 
        RadTabStrip1.SelectedIndex = 3;
 
        PageView4.Focus();
 
    }
 
    protected void Button7_Click(object sender, EventArgs e)
 
    {
 
        RadTabStrip1.Tabs[0].Enabled = true;
 
        RadTabStrip1.Tabs[1].Enabled = true;
 
        RadTabStrip1.Tabs[2].Enabled = true;
 
        RadTabStrip1.Tabs[3].Enabled = true;
 
        RadTabStrip1.Tabs[4].Enabled = true;
 
        RadTabStrip1.Tabs[4].PageView.Enabled = PageView4;
 
        PageView4.Focus();
 
   
 
    }

Open in new window

RomacaliAsked:
Who is Participating?
 
williamcampbellConnect With a Mentor Commented:
Try keeping a variable for the current focus page
object lastView;
 
protected void Page_Load(object sender, EventArgs e)
     {
        if (!Page.IsPostBack)
        { 
             lastView = PageView1;
        RadTabStrip1.Tabs[0].Enabled = true;
 
        RadTabStrip1.Tabs[1].Enabled = false;
 
        RadTabStrip1.Tabs[2].Enabled = false;
 
        RadTabStrip1.Tabs[3].Enabled = false;
 
        RadTabStrip1.Tabs[4].Enabled = false;
        }
        lastView.Focus();
        
    }
 
    protected void Button1_Click(object sender, EventArgs e)
 
    {
 
        RadTabStrip1.Tabs[0].Enabled = true;
 
        RadTabStrip1.Tabs[1].Enabled = true;
 
        RadMultiPage1.SelectedIndex = 1;
 
        RadTabStrip1.SelectedIndex = 1;
 
        lastView = PageView2;
 
    }

Open in new window

0
 
williamcampbellCommented:
in  PageLoad

add a check for postback

   if ( !PostBack)
  {
       RadTabStrip1.Tabs[0].Enabled = true;
 
        RadTabStrip1.Tabs[1].Enabled = false;
 
        RadTabStrip1.Tabs[2].Enabled = false;
 
        RadTabStrip1.Tabs[3].Enabled = false;
 
        RadTabStrip1.Tabs[4].Enabled = false;
 
        PageView1.Focus();
 
  }
}

Otherwise you keep getting the same look
0
 
RomacaliAuthor Commented:
hello there,

What I need is to enabled the page view that comes with clicking the tab strip, not the tab strip itself.
any idea?

thanks
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
RomacaliAuthor Commented:
Right Now, I have the strip tabs and I'm able to see the forms only if I click on the button next... once I clicked on the other tabs the form doesn't change.. it keeps on the last one..
please I need some help..
thanks,
Caliu
0
 
williamcampbellCommented:
Can you try this code?
protected void Page_Load(object sender, EventArgs e)
     {
        if (!Page.IsPostBack){ 
        RadTabStrip1.Tabs[0].Enabled = true;
 
        RadTabStrip1.Tabs[1].Enabled = false;
 
        RadTabStrip1.Tabs[2].Enabled = false;
 
        RadTabStrip1.Tabs[3].Enabled = false;
 
        RadTabStrip1.Tabs[4].Enabled = false;
        
        PageView1.Focus();
        }
    }

Open in new window

0
 
RomacaliAuthor Commented:
I can unable and disable buttons but I also want the form to come with each tab. Right now it is not :(

0
 
williamcampbellCommented:
Did put in the change I posted above?
0
 
RomacaliAuthor Commented:
yes I added but still nothing
0
 
RomacaliAuthor Commented:
Now I got this error:
Compiler Error Message: CS0103: The name 'lastView' does not exist in the current context

 
0
 
RomacaliAuthor Commented:
and this:
Or I get this error too

Compiler Error Message: CS0117: 'object' does not contain a definition for 'Focus'
0
 
williamcampbellCommented:

 You need to add lastView to your class it should be the same type as PageView
 I'm not sure what type PageView is.
0
 
RomacaliAuthor Commented:
here is what I have on the cs page

not sure how to add the lastView object
using System;
 
using System.Data;
 
using System.Configuration;
 
using System.Collections;
 
using System.Web;
 
using System.Web.Security;
 
using System.Web.UI;
 
using System.Web.UI.WebControls;
 
using System.Web.UI.WebControls.WebParts;
 
using System.Web.UI.HtmlControls;
 
 
 
public partial class PPTRadStrip : System.Web.UI.Page
 
{
 
   // object lastView;
 
 
 
    protected void Page_Load(object sender, EventArgs e)
 
    {
 
        RadTabStrip1.Tabs[0].Enabled = true;
 
        RadTabStrip1.Tabs[1].Enabled = false;
 
        RadTabStrip1.Tabs[2].Enabled = false;
 
        RadTabStrip1.Tabs[3].Enabled = false;
 
        RadTabStrip1.Tabs[4].Enabled = false;
 
        PageView1.Focus();
 
 
 
        }
 
    
 
    
 
    protected void Button1_Click(object sender, EventArgs e)
 
    {
 
        RadTabStrip1.Tabs[0].Enabled = true;
 
        RadTabStrip1.Tabs[1].Enabled = true;
 
        RadMultiPage1.SelectedIndex = 1;
 
        RadTabStrip1.SelectedIndex = 1;
 
        PageView2.Focus();
 
    }
 
    protected void Button3_Click(object sender, EventArgs e)
 
    {
 
        RadTabStrip1.Tabs[0].Enabled = true;
 
        RadTabStrip1.Tabs[1].Enabled = true;
 
        RadTabStrip1.Tabs[2].Enabled = true;
 
        RadMultiPage1.SelectedIndex = 2;
 
        RadTabStrip1.SelectedIndex = 2;
 
        PageView3.Focus();
 
    }
 
 
 
    protected void Button5_Click(object sender, EventArgs e)
 
    {
 
        RadTabStrip1.Tabs[0].Enabled = true;
 
        RadTabStrip1.Tabs[1].Enabled = true;
 
        RadTabStrip1.Tabs[2].Enabled = true;
 
        RadTabStrip1.Tabs[3].Enabled = true;
 
        RadMultiPage1.SelectedIndex = 3;
 
        RadTabStrip1.SelectedIndex = 3;
 
        PageView4.Focus();
 
    }
 
    protected void Button7_Click(object sender, EventArgs e)
 
    {
 
        RadTabStrip1.Tabs[0].Enabled = true;
 
        RadTabStrip1.Tabs[1].Enabled = true;
 
        RadTabStrip1.Tabs[2].Enabled = true;
 
        RadTabStrip1.Tabs[3].Enabled = true;
 
        RadTabStrip1.Tabs[4].Enabled = true;
 
        RadMultiPage1.SelectedIndex = 4;
 
        RadTabStrip1.SelectedIndex = 4;
 
        PageView5.Focus();
 
 
 
    }
 
    protected void Button9_Click(object sender, EventArgs e)
 
    {
 
        RadTabStrip1.Tabs[0].Enabled = true;
 
        RadTabStrip1.Tabs[1].Enabled = false;
 
        RadTabStrip1.Tabs[2].Enabled = false;
 
        RadTabStrip1.Tabs[3].Enabled = false;
 
        RadTabStrip1.Tabs[4].Enabled = false;
 
       // RadTabStrip1.Tabs[5].Enabled = false;
 
        RadMultiPage1.SelectedIndex = 0;
 
        RadTabStrip1.SelectedIndex = 0;
 
        PageView1.Focus();
 
       // Console.Write("You have succesfully entered the participant information");
 
        //lastView = PageView2;
 
 
 
 
 
 
 
    }

Open in new window

0
 
williamcampbellCommented:
Should be like this ...
public partial class PPTRadStrip : System.Web.UI.Page
{
 
    public PageView lastView; // It should be type PageView
 
    protected void Page_Load(object sender, EventArgs e)
    {
 
        if ( !IsPostBack () )
        {
            RadTabStrip1.Tabs[0].Enabled = true;
            RadTabStrip1.Tabs[1].Enabled = false;
            RadTabStrip1.Tabs[2].Enabled = false;
            RadTabStrip1.Tabs[3].Enabled = false;
            RadTabStrip1.Tabs[4].Enabled = false;
 
            lastView = PageView1;
        }
 
        lastView.Focus ();
     }
 
    protected void Button1_Click(object sender, EventArgs e)
    {
        RadTabStrip1.Tabs[0].Enabled = true;
        RadTabStrip1.Tabs[1].Enabled = true;
        RadMultiPage1.SelectedIndex = 1;
        RadTabStrip1.SelectedIndex = 1;
 
        lastView = PageView2;
    }
 
    protected void Button3_Click(object sender, EventArgs e)
    {
        RadTabStrip1.Tabs[0].Enabled = true;
        RadTabStrip1.Tabs[1].Enabled = true;
        RadTabStrip1.Tabs[2].Enabled = true;
        RadMultiPage1.SelectedIndex = 2;
        RadTabStrip1.SelectedIndex = 2;
 
        lastView = PageView3;
    }
 
    protected void Button5_Click(object sender, EventArgs e)
    {
        RadTabStrip1.Tabs[0].Enabled = true;
        RadTabStrip1.Tabs[1].Enabled = true;
        RadTabStrip1.Tabs[2].Enabled = true;
        RadTabStrip1.Tabs[3].Enabled = true;
        RadMultiPage1.SelectedIndex = 3;
        RadTabStrip1.SelectedIndex = 3;
 
        lastView = PageView4;
    }
 
    protected void Button7_Click(object sender, EventArgs e)
    {
        RadTabStrip1.Tabs[0].Enabled = true;
        RadTabStrip1.Tabs[1].Enabled = true;
        RadTabStrip1.Tabs[2].Enabled = true;
        RadTabStrip1.Tabs[3].Enabled = true;
        RadTabStrip1.Tabs[4].Enabled = true;
        RadMultiPage1.SelectedIndex = 4;
        RadTabStrip1.SelectedIndex = 4;
 
        lastView = PageView5;
    }
 
    protected void Button9_Click(object sender, EventArgs e)
    {
        RadTabStrip1.Tabs[0].Enabled = true;
        RadTabStrip1.Tabs[1].Enabled = false;
        RadTabStrip1.Tabs[2].Enabled = false;
        RadTabStrip1.Tabs[3].Enabled = false;
        RadTabStrip1.Tabs[4].Enabled = false;
 
       // RadTabStrip1.Tabs[5].Enabled = false;
 
        RadMultiPage1.SelectedIndex = 0;
        RadTabStrip1.SelectedIndex = 0;
 
        lastView = PageView1;
 
       // Console.Write("You have succesfully entered the participant information");
 
        //lastView = PageView2;
    }
}

Open in new window

0
 
RomacaliAuthor Commented:
I tried and I got this:

Compiler Error Message: CS0246: The type or namespace name 'PageView' could not be found (are you missing a using directive or an assembly reference?)

Source Error:

 
 
 
Line 12: public partial class evaluation : System.Web.UI.Page
Line 13: {
Line 14:         public PageView lastView; // It should be type PageView
Line 15:
Line 16:         protected void Page_Load(object sender, EventArgs e)
 

 pointing to: Line 14:         public PageView lastView; // It should be type PageView

 
0
 
williamcampbellCommented:
Yeah I don't know what a PageView you need to change it.

What is it?
0
 
williamcampbellCommented:
Its a control of some type
0
 
RomacaliAuthor Commented:
I have a form, that has on the left side tabs - each tab brings a form on the right hand side, but it is not working I click on the tabs and it doesn't let me see the form..
the only thing that works is when I click submit it goes to the nest form view (page view)

thanks for helping me!! I'm loosing my mind
0
 
williamcampbellCommented:
Can you see all the forms at once? Is Pageview a Form?

    Form lastView  instead of PageView lastView

   Form.Focus wont work you need to hide all the forms and show the one that needs to be active

   Pageview1.Hide ();
   Pageview2.Hide ();
   Pageview3.Hide ();
   Pageview4.Hide ();
   Pageview5.Hide ();

  lastView.Show ();
0
 
RomacaliAuthor Commented:
I still cannot make it works..
here is what I'm trying to do:
http://demos.telerik.com/aspnet-ajax/tabstrip/examples/functionality/vertical/defaultcs.aspx

The problem is once I click on the pages the form doesn't change.

any idea?
0
 
RomacaliAuthor Commented:
one more thing:
Compiler Error Message: CS0117: 'ASP.pptradstrip_aspx' does not contain a definition for 'RadTabStrip1_TabClick'

 

Where can I make a definition for 'RadTabStrip1_TabClick' ?

0
 
williamcampbellCommented:
Woooohoo ..Looks good Roma :)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.