This is a migrated thread and some comments may be shown as answers.

TabStrip and controls at runtime (CodeBehind)

8 Answers 78 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Luiz
Top achievements
Rank 1
Luiz asked on 02 Dec 2010, 10:48 PM
Hi,

I'm trying to create a page with TabStrip+Multipage+PanelBar+TextBox but it isn't work.
Somebody can help me?

Following my code:

Imports Telerik.Web.UI
 
Partial Public Class _Default
    Inherits System.Web.UI.Page
 
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
 
        'Multipage
        Dim myMultipage As New RadMultiPage
        myMultipage.ID = "myMultipage"
        myMultipage.ScrollBars = MultiPageScrollBars.Auto
 
        'Tabs
        Dim tabProduto As New RadTab
        tabProduto.Text = "Produtos"
        tabProduto.PageViewID = tabProduto.Text
        Dim tabCliente As New RadTab
        tabCliente.Text = "Clientes"
        tabCliente.PageViewID = tabCliente.Text
        Dim tabCondPag As New RadTab
        tabCondPag.Text = "Condições de Pagamento"
        tabCondPag.PageViewID = tabCondPag.Text
        Dim tabfornecedor As New RadTab
        tabfornecedor.Text = "Fornecedores"
        tabfornecedor.PageViewID = tabfornecedor.Text
 
        'TabStrip
        Dim myTabStrip As New RadTabStrip
        myTabStrip.MultiPageID = "myMultipage"
        myTabStrip.Tabs.Add(tabProduto)
        myTabStrip.Tabs.Add(tabCliente)
        myTabStrip.Tabs.Add(tabCondPag)
        myTabStrip.Tabs.Add(tabfornecedor)
 
        'PageView
        Dim pagviewProduto As New RadPageView
        pagviewProduto.ID = tabProduto.Text
        Dim pagviewCliente As New RadPageView
        pagviewCliente.ID = tabCliente.Text
        Dim pagviewCondPag As New RadPageView
        pagviewCondPag.ID = tabCondPag.Text
        Dim pagviewFornecedor As New RadPageView
        pagviewFornecedor.ID = tabfornecedor.Text
 
        'Controles da TabCliente (My classes inherited from Textboxes)
        Dim myTextBox As New gInputText("Nome", 80)
        Dim myTextBox2 As New gInputText("Endereço", 80)
        Dim myTextBox3 As New gInputText("Bairro", 50)
        Dim myTextBox4 As New gInputText("Cidade", 50)
 
        'Painel Principal da aba TabCliente
        Dim myGroupParent As New RadPanelBar
        myGroupParent.Width = 900
        myGroupParent.ExpandMode = PanelBarExpandMode.FullExpandedItem
        myGroupParent.Skin = "Office2007"
 
        'Grupo Dados Gerais do cliente
        Dim myGroup As New RadPanelItem
        myGroup.Expanded = True
        myGroup.Text = "Dados Gerais do Cliente"
        myGroup.Selected = True
        myGroup.Controls.Add(myTextBox)
        myGroup.Controls.Add(myTextBox2)
        myGroup.Controls.Add(myTextBox3)
        myGroup.Controls.Add(myTextBox4)
        myGroupParent.Items.Add(myGroup)
 
        tabCliente.Controls.Add(myGroupParent)
        Panel1.Controls.Add(myTabStrip)
 
    End Sub
 
End Class

Tks

Luiz

8 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 03 Dec 2010, 10:53 AM
Hello Luiz,

Form this demo,I found there is a better approach for adding the controls in the PageViewCreated  event other than from PageLoad event. .please try with that method and check whether that works.

Thanks,
Princy.
0
Luiz
Top achievements
Rank 1
answered on 03 Dec 2010, 11:14 AM
Princy,

I know this demo but my problem is:

I can´t add TextBoxes under RadPanel under TabStrip under TabStrip/Pageview.
If you run my project you see that RadPanel will not be under Pageview  :-(

Can you help me?

Tks

Luiz
0
Dimitar Terziev
Telerik team
answered on 06 Dec 2010, 02:54 PM
Hello Luiz,

I've prepared a small example based on your code showing what you need.

Best wishes,
Dimitar Terziev
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Luiz
Top achievements
Rank 1
answered on 06 Dec 2010, 03:01 PM
Dimitar 

Tks for your support.
I wil test this code and implement on my system.

PS: Can I add javascript on my ASPX at runtime also?

Tks

Luiz
0
Dimitar Terziev
Telerik team
answered on 09 Dec 2010, 09:46 AM
Hello Luiz,

For adding javascript into your page during runtime you could check this post here.

All the best,
Dimitar Terziev
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Luiz
Top achievements
Rank 1
answered on 09 Dec 2010, 10:06 AM
Dimitar 

This page doesn´t open!

Tks

Luiz
0
Yana
Telerik team
answered on 09 Dec 2010, 11:21 AM
Hi Luiz,

Please try it again here.

Regards,
Yana
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Luiz
Top achievements
Rank 1
answered on 09 Dec 2010, 11:33 AM
Yana 

Fantastic! I think this is solve my problem.
I will try, if I have problems, I ask for help

Tks

Luiz
Tags
TabStrip
Asked by
Luiz
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Luiz
Top achievements
Rank 1
Dimitar Terziev
Telerik team
Yana
Telerik team
Share this question
or