bout multipage coltrol

2 posts, 0 answers
  1. Webster Velasco
    Webster Velasco avatar
    114 posts
    Member since:
    Jun 2012

    Posted 21 Dec 2009 Link to this post

    hi

    im using tabstrip control

    and i want to find all controls that my radpageview control use

    want to use a same code like this on fiding the control

        Public Sub ImpostaCampiDataBase(ByVal Pagina As Page, ByVal IDWS As String, ByVal NotaMod As String) 
            ' imposta campi data base dalla pagina web 
            TestoMessaggio = "" 
            Dim c As Control 
            Dim childc As Control 
            Dim intc As Integer 
     
            Try 
                For Each c In Pagina.Controls 
                    For Each childc In c.Controls 
                        If TypeOf childc Is TextBox Then 
                            If Left(CType(childc, TextBox).ID, 3) = "txt" Then 
                                ReDim Preserve param(intc) 
                                ReDim Preserve paramVal(intc) 
                                param(intc) = Mid(childc.ID, 4) 
                                paramVal(intc) = CType(childc, TextBox).Text 
                                intcintc = intc + 1 
                            End If 
                        ElseIf TypeOf childc Is Telerik.Web.UI.RadTextBox Then 
                            If Left(CType(childc, Telerik.Web.UI.RadTextBox).ID, 3) = "txt" Then 
                                ReDim Preserve param(intc) 
                                ReDim Preserve paramVal(intc) 
                                param(intc) = Mid(childc.ID, 4) 
                                paramVal(intc) = CType(childc, Telerik.Web.UI.RadTextBox).Text 
                                intcintc = intc + 1 
                            End If 
                        ElseIf TypeOf childc Is Telerik.Web.UI.RadDatePicker Then 
                            If Left(CType(childc, Telerik.Web.UI.RadDatePicker).ID, 3) = "rdp" Then 
                                ReDim Preserve param(intc) 
                                ReDim Preserve paramVal(intc) 
                                param(intc) = Mid(childc.ID, 4) 
     
                                If CType(childc, Telerik.Web.UI.RadDatePicker).IsEmpty = True Then 
                                    paramVal(intc) = "" 
                                Else 
                                    paramVal(intc) = CType(childc, Telerik.Web.UI.RadDatePicker).SelectedDate 
                                End If 
                                intcintc = intc + 1 
                            End If 
     
                        ElseIf TypeOf childc Is Telerik.Web.UI.RadComboBox Then 
                            If Left(CType(childc, Telerik.Web.UI.RadComboBox).ID, 3) = "lst" Then 
                                ReDim Preserve param(intc) 
                                ReDim Preserve paramVal(intc) 
                                param(intc) = Mid(childc.ID, 4) 
                                paramVal(intc) = CType(childc, Telerik.Web.UI.RadComboBox).SelectedValue 
                                intcintc = intc + 1 
                            End If 
                        End If 
                    Next 
                Next 
                ReDim Preserve param(intc) 
                ReDim Preserve paramVal(intc) 
                param(intc) = "IDWS" 
                paramVal(intc) = IDWS 
                intcintc = intc + 1 
                ReDim Preserve param(intc) 
                ReDim Preserve paramVal(intc) 
                param(intc) = "NOTAMOD" 
                paramVal(intc) = NotaMod 
     
            Catch _err As Exception 
                TestoMessaggio = "Errore Imposta Campi DataBase - " + _err.Source + "->" + _err.Message 
            End Try 
     
        End Sub 

    i hope u will help me

    thanks a lot

    regards
    webster
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 22 Dec 2009 Link to this post

    Hello,

    Try the following code snippet for getting the control collection inside PageView.

    VB:
     
    Protected Sub Button1_Click(ByVal sender As ObjectByVal e As EventArgs) 
        ' Dim newCollection As ControlCollection = RadPageView2.Controls 
        For Each c As Control In RadPageView2.Controls 
            If TypeOf c Is TextBox Then 
                Response.Write("TextBox"
            ElseIf TypeOf c Is RadDatePicker Then 
                Response.Write("RadDatePicker"
            End If 
        Next 
    End Sub 

    -Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top