select item

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

    Posted 30 Jun 2010 Link to this post

    hi
    i want to know, how can i select an item in radpanelbar inside a main master(without clicking on it) when my page is loaded?

    here is my page

    main master
    <%@ Master Language="vb" AutoEventWireup="false" CodeBehind="Main.Master.vb" Inherits="WICEA.Main" %> 
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
     
    <html xmlns="http://www.w3.org/1999/xhtml"
    <head id="Head1" runat="server"
        <title>WebBIO Demo</title> 
        <link rel="shortcut icon" href="_img/logoSito.ico" /> 
        <link href="../_styles/main.css" type="text/css" rel="stylesheet" /> 
        <link href="../_styles/PPA.css" type="text/css" rel="stylesheet" /> 
        <style type="text/css"
        html, form, body, body #container 
        { 
            height: 100%; 
            margin: 0px; 
            padding: 0px; 
            overflow: hidden; 
        }   
       .RadInput .riTextBox  
        { 
            border-width: 2px !important; 
        }      
        </style> 
         
     
    </head> 
    <body> 
        <form id="form2" runat="server">     
            <telerik:RadScriptManager ID="RadScriptManager1" runat="server" /> 
                <telerik:RadFormDecorator ID="RadFormDecorator1" DecoratedControls="Scrollbars" runat="server" EnableRoundedCorners="false" />           
            <div id="ParentDivElement" style="height: 100%;"
                <telerik:RadSplitter ID="MainSplitter" runat="server" Height="100%" Width="100%" 
                    Orientation="Horizontal" VisibleDuringInit="false"
                    <telerik:RadPane ID="paneTitle" runat="server" Width="100%" Height="74px" BackColor="#438BCA" Locked="true" Scrolling="None"
                        <table width="100%" cellspacing="0" cellpadding="0"
                            <tr> 
                                <td class="titleCell"
                                    <asp:Label Text="ICEA - Istituto per la Certificazione Etica ed Ambientale" runat="server"  CssClass="titleLabel" ID="lblTitolo"></asp:Label> 
                                </td> 
                                <td align="right"
                                    <div class="skin-chooser"
                                        <label for="ctl00_RadMenu1_i3_SkinChooser_Input" class="skinLabel">Skin:</label> 
                                            <telerik:RadSkinManager ID="RadSkinManager" runat="server" ShowChooser="true" Skin="Windows7" 
                                                PersistenceKey="Skin" PersistenceMode="Session"
                                            </telerik:RadSkinManager> 
                                    </div> 
                                </td>                                
                            </tr> 
                            <tr> 
                                <td align="left"
                                    <asp:Label Text="Via Nazario Sauro 2, 40121 Bologna - C.F. e Partita IVA 02107241206 - tel. +39 051.272986 - fax +39 051.232011" runat="server" ID="Label1"></asp:Label> 
                                </td> 
                            </tr> 
                        </table> 
                    </telerik:RadPane> 
                    <telerik:RadSplitBar ID="RadsplitbarTop" runat="server" CollapseMode="None" /> 
                    <telerik:RadPane ID="MainPane" runat="server" Scrolling="none" MinWidth="500"
                        <telerik:RadSplitter ID="NestedSplitter" runat="server" LiveResize="true"
                            <telerik:RadPane ID="LeftPane" runat="server" Width="230" MinWidth="150" MaxWidth="400"
                                <telerik:RadPanelBar ID="panelMenu" runat="server" PersistStateInCookie="true" ExpandMode="SingleExpandedItem" Height="100%" Width="225px"
                                    <Items> 
                                        <telerik:RadPanelItem runat="server" Text="Anagrafiche"
                                            <Items> 
                                                <telerik:RadPanelItem runat="server" Text="Soggetti" > 
                                                    <Items> 
                                                        <telerik:RadPanelItem runat="server" Text="Dichiaranti" NavigateUrl="DichiarantiRicerca.aspx?Da=Main"  /> 
                                                        <telerik:RadPanelItem runat="server" Text="Rappresentanti Legali" NavigateUrl="RappresentantiLegaliRicerca.aspx?Da=Main"  /> 
                                                        <telerik:RadPanelItem runat="server" Text="Tecnici" NavigateUrl="TecniciRicerca.aspx?Da=Main"  /> 
                                                        <telerik:RadPanelItem runat="server" Text="Convenzioni" NavigateUrl="ConvenzioniRicerca.aspx?Da=Main"  /> 
                                                        <telerik:RadPanelItem runat="server" Text="Altri Soggetti" NavigateUrl="AltriSoggettiRicerca.aspx?Da=ASo"  /> 
                                                    </Items> 
                                                </telerik:RadPanelItem> 
                                                 
                                                <telerik:RadPanelItem runat="server" Text="Produzione" > 
                                                    <Items> 
                                                        <telerik:RadPanelItem runat="server" Text="Specie Vegetali" NavigateUrl="SpecieVegetaliRicerca.aspx?Da=Main"  /> 
                                                        <telerik:RadPanelItem runat="server" Text="Varietà Vegetali" NavigateUrl="VarietaSpecieVegetaliRicerca.aspx?Da=Main"  /> 
                                                        <telerik:RadPanelItem runat="server" Text="Aggregazioni Specie Vegetali" NavigateUrl="AggregazioniSpecieVegetaliRicerca.aspx?Da=Main"  /> 
                                                        <telerik:RadPanelItem runat="server" Text="Orientamenti Produttivi" NavigateUrl="OrientamentoProduttivoRicerca.aspx?Da=Main"  />                                                     
                                                    </Items> 
                                                </telerik:RadPanelItem> 
     
                                                <telerik:RadPanelItem runat="server" Text="Trasformazione/Altri Schemi" > 
                                                    <Items> 
                                                        <telerik:RadPanelItem runat="server" Text="Comparti Produttivi" NavigateUrl="CompartiProduttiviRicerca.aspx?Da=Main"  /> 
                                                        <telerik:RadPanelItem runat="server" Text="Nature Operazioni" NavigateUrl="NatureOperazioniRicerca.aspx?Da=Main"  /> 
                                                        <telerik:RadPanelItem runat="server" Text="Prodotti Trasformati" NavigateUrl="ProdottiTrasformatiRicerca.aspx?Da=Main"  /> 
                                                        <telerik:RadPanelItem runat="server" Text="Prodotti Chimici" NavigateUrl="ProdottiChimiciRicerca.aspx?Da=Main"  /> 
                                                        <telerik:RadPanelItem runat="server" Text="Tipo Ingredienti" NavigateUrl="TipoIngredientiRicerca.aspx?Da=Main"  /> 
                                                        <telerik:RadPanelItem runat="server" Text="Tipo Struttura" NavigateUrl="TipoStruttureRicerca.aspx?Da=Main"  /> 
                                                        <telerik:RadPanelItem runat="server" Text="Gruppo Comparto" NavigateUrl="GruppoCompartoRicerca.aspx?Da=Main"  /> 
                                                        <telerik:RadPanelItem runat="server" Text="Sotto Gruppo Comparto" NavigateUrl="SottoGruppoCompartoRicerca.aspx?Da=Main"  /> 
                                                        <telerik:RadPanelItem runat="server" Text="Comparti Cosmesi" NavigateUrl="CompartiCosmesiRicerca.aspx?Da=Main"  />                                                   
                                                        <telerik:RadPanelItem runat="server" Text="Tipo Trasformazione" NavigateUrl="TipoTrasformazioneRicerca.aspx?Da=Main"  /> 
                                                    </Items> 
                                                </telerik:RadPanelItem> 
     
                                                <telerik:RadPanelItem runat="server" Text="Zootecnia" > 
                                                    <Items> 
                                                        <telerik:RadPanelItem runat="server" Text="Specie Bestiame" NavigateUrl="SpecieBestiameRicerca.aspx?Da=Main"  /> 
                                                        <telerik:RadPanelItem runat="server" Text="Razze Bestiame" NavigateUrl="RazzeBestiameRicerca.aspx?Da=Main"  />       
                                                        <telerik:RadPanelItem runat="server" Text="Sotto Razze Bestiame" NavigateUrl="SottoRazzeBestiameRicerca.aspx?Da=Main" /> 
                                                        <telerik:RadPanelItem runat="server" Text="Tipo Allevamento" NavigateUrl="TipoAllevamentiRicerca.aspx?Da=Main"  /> 
                                                        <telerik:RadPanelItem runat="server" Text="Tipo Prodotti Animali" NavigateUrl="TipoProdottiAnimaliRicerca.aspx?Da=Main"  /> 
                                                    </Items> 
                                                </telerik:RadPanelItem> 
                                                <telerik:RadPanelItem runat="server" Text="Analisi" > 
                                                    <Items> 
                                                        <telerik:RadPanelItem runat="server" Text="Laboratori" NavigateUrl="LaboratoriRicerca.aspx?Da=Main"  /> 
                                                    </Items> 
                                                </telerik:RadPanelItem> 
                                                <telerik:RadPanelItem runat="server" Text="Amministrazione" > 
                                                    <Items>                                                  
                                                        <telerik:RadPanelItem runat="server" Text="Tipo Pagamenti" NavigateUrl="TipoPagamentiRicerca.aspx?Da=Main"  /> 
                                                        <telerik:RadPanelItem runat="server" Text="Codici Iva" NavigateUrl="CodiciIvaRicerca.aspx?Da=Main"  /> 
                                                        <telerik:RadPanelItem runat="server" Text="Causali Fattura" NavigateUrl="CausaliFatturaRicerca.aspx?Da=Main"  /> 
                                                        <telerik:RadPanelItem runat="server" Text="Causali Pagamento" NavigateUrl="CausaliPagamentoRicerca.aspx?Da=Main"  /> 
                                                    </Items> 
                                                </telerik:RadPanelItem> 
                                                <telerik:RadPanelItem runat="server" Text="Sanzioni" > 
                                                    <Items> 
                                                        <telerik:RadPanelItem runat="server" Text="Casistiche" NavigateUrl="SanzioniCasisticheRicerca.aspx?Da=Main" /> 
                                                        <telerik:RadPanelItem runat="server" Text="Tipologie" NavigateUrl="TipoSanzioniRicerca.aspx?Da=Main" /> 
                                                    </Items> 
                                                </telerik:RadPanelItem> 
                                                <telerik:RadPanelItem runat="server" Text="Localizzazioni" > 
                                                    <Items> 
                                                        <telerik:RadPanelItem runat="server" Text="Nazioni" NavigateUrl="NazioniRicerca.aspx?Da=Main"  /> 
                                                        <telerik:RadPanelItem runat="server" Text="Regioni" NavigateUrl="RegioniRicerca.aspx?Da=Main"  /> 
                                                        <telerik:RadPanelItem runat="server" Text="Aree" NavigateUrl="AreeRicerca.aspx?Da=Main"  /> 
                                                        <telerik:RadPanelItem runat="server" Text="Province" NavigateUrl="ProvinceRicerca.aspx?Da=Main"  /> 
                                                        <telerik:RadPanelItem runat="server" Text="Comuni" NavigateUrl="ComuniRicerca.aspx?Da=Main"  /> 
                                                        <telerik:RadPanelItem runat="server" Text="Uffici Territoriali" NavigateUrl="UfficiTerritorialiRicerca.aspx?Da=Main" /> 
                                                    </Items> 
                                                </telerik:RadPanelItem> 
                                                <telerik:RadPanelItem runat="server" Text="Schemi di certificazione" NavigateUrl="schemiCertificazioneRicerca.aspx" /> 
                                                <telerik:RadPanelItem runat="server" Text="Varie" > 
                                                    <Items> 
                                                        <telerik:RadPanelItem runat="server" Text="Unità di Misura" NavigateUrl="UnitaMisuraRicerca.aspx?Da=Main" /> 
                                                        <telerik:RadPanelItem runat="server" Text="Tipo Altri Dati" NavigateUrl="TipoAltriDatiRicerca.aspx?Da=Main" /> 
                                                        <telerik:RadPanelItem runat="server" Text="Tipo Altri Soggetti" NavigateUrl="TipoAltriSoggettiRicerca.aspx?Da=Main" /> 
                                                        <telerik:RadPanelItem runat="server" Text="Decodifiche" NavigateUrl="DecodificheRicerca.aspx?Da=Main"  /> 
                                                        <telerik:RadPanelItem runat="server" Text="Classe di rischio" NavigateUrl="ClasseRischioRicerca.aspx?Da=Main"  /> 
                                                        <telerik:RadPanelItem runat="server" Text="Tipo Notifica" NavigateUrl="TipiNotificheRicerca.aspx?Da=Main"  /> 
                                                        <telerik:RadPanelItem runat="server" Text="Settori" NavigateUrl="SettoriRicerca.aspx?Da=Main"  /> 
                                                    </Items> 
                                                </telerik:RadPanelItem> 
                                                 
                                            </Items> 
                                        </telerik:RadPanelItem> 
                                         
                                        <telerik:RadPanelItem runat="server" Text="Modulistica" NavigateUrl="ModulisticaRicerca.aspx?Da=Main"  /> 
                                        <telerik:RadPanelItem runat="server" Text="Messaggistica/Scadenziario" NavigateUrl="ScadenziarioElenco.aspx" /> 
                                         
                                        <telerik:RadPanelItem runat="server" Text="Operatività" Value="MO"
                                            <Items> 
                                                <telerik:RadPanelItem runat="server" Text="834" Value="834"
                                                    <Items> 
                                                        <telerik:RadPanelItem runat="server" Text="Primi Contatti" NavigateUrl="PrimoContatto.aspx?SC=834" /> 
                                                        <telerik:RadPanelItem runat="server" Text="Ricezione Documenti" NavigateUrl="RicezioneDoc.aspx?SC=834" /> 
                                                        <telerik:RadPanelItem runat="server" Text="Invio Documenti" NavigateUrl="" /> 
                                                        <telerik:RadPanelItem runat="server" Text="Inserimento Prima Notifica" NavigateUrl="PrimaNotifica.aspx?SC=834" Value="P" /> 
                                                        <telerik:RadPanelItem runat="server" Text="Notifica Variazione" NavigateUrl="NotificaDiVariazione.aspx?SC=834" Value="V" /> 
                                                        <telerik:RadPanelItem runat="server" Text="Invio Documenti" NavigateUrl="" /> 
                                                        <telerik:RadPanelItem runat="server" Text="Programma annuale" NavigateUrl="ProcessoProgrammaAnnuale.aspx?SC=834&P=5" /> 
                                                        <telerik:RadPanelItem runat="server" Text="Programma annuale 2" NavigateUrl="ProcessoProgrammaAnnuale2.aspx?P=5" /> 
                                                        <telerik:RadPanelItem runat="server" Text="Programma annuale 3" NavigateUrl="ProcessoProgrammaAnnuale3.aspx?P=5" /> 
                                                        <telerik:RadPanelItem runat="server" Text="Pianificazione Visite" NavigateUrl="ProcessoPianVisite.aspx?SC=834" /> 
                                                        <telerik:RadPanelItem runat="server" Text="Accettazione Visite" NavigateUrl="ProcessoAccettazioneVisite.aspx?SC=834" /> 
                                                        <telerik:RadPanelItem runat="server" Text="Ispezioni" NavigateUrl="ProcessoIspezioni.aspx?SC=834" /> 
                                                        <telerik:RadPanelItem runat="server" Text="Cocer" NavigateUrl="ProcessoCocer.aspx?SC=834" /> 
                                                    </Items> 
                                                </telerik:RadPanelItem> 
                                            </Items> 
                                        </telerik:RadPanelItem> 
                                        <telerik:RadPanelItem runat="server" Text="Consultazione Dati"
                                            <Items> 
                                                <telerik:RadPanelItem runat="server" Text="834"
                                                <Items> 
                                                    <telerik:RadPanelItem runat="server" Text="Dichiaranti" Navigateurl="DichiarantiVisualizzazione.aspx?schema=834"/> 
                                                </Items> 
                                                 
                                              </telerik:RadPanelItem> 
                                             </Items> 
                                        </telerik:RadPanelItem> 
                                        <telerik:RadPanelItem runat="server" Text="Mio Profilo"
                                            <Items> 
                                                <telerik:RadPanelItem runat="server" Text="Cambia password" Navigateurl=""/> 
                                                <telerik:RadPanelItem runat="server" Text="Esci" NavigateUrl="~/Login.aspx?logout=1"/> 
                                            </Items> 
                                        </telerik:RadPanelItem> 
                                        <telerik:RadPanelItem runat="server" Text="MultiLingue"
                                            <Items> 
                                                <telerik:RadPanelItem runat="server" Text="Gestione Esc"
                                                    <Items> 
                                                        <telerik:RadPanelItem runat="server" Text="Menu" NavigateUrl="ElencoESCMenu.aspx" /> 
                                                        <telerik:RadPanelItem runat="server" Text="Pagine" NavigateUrl="ElencoESCPagine.aspx" /> 
                                                        <telerik:RadPanelItem runat="server" Text="Campi" NavigateUrl="ElencoESCCampi.aspx" /> 
                                                    </Items> 
                                                </telerik:RadPanelItem> 
                                                <telerik:RadPanelItem runat="server" Text="Gestione Utente"
                                                    <Items> 
                                                        <telerik:RadPanelItem runat="server" Text="Menu" NavigateUrl="ElencoUTEMenu.aspx" /> 
                                                        <telerik:RadPanelItem runat="server" Text="Lingue" NavigateUrl="ElencoUTELingue.aspx" /> 
                                                        <telerik:RadPanelItem runat="server" Text="Pagine" NavigateUrl="ElencoUTEPagine.aspx" /> 
                                                        <telerik:RadPanelItem runat="server" Text="Campi" NavigateUrl="ElencoUTECampi.aspx" /> 
                                                        <telerik:RadPanelItem runat="server" Text="Errori" NavigateUrl="ElencoUTEErrori.aspx" /> 
                                                        <telerik:RadPanelItem runat="server" Text="ProcessiTestataLingua" NavigateUrl="ElencoProcessiTestataLingua.aspx" /> 
                                                        <telerik:RadPanelItem runat="server" Text="ProcessiDettaglioLingua" NavigateUrl="ElencoProcessiDettaglioLingua.aspx" /> 
                                                    </Items> 
                                                </telerik:RadPanelItem> 
                                            </Items> 
                                        </telerik:RadPanelItem>      
                                        <telerik:RadPanelItem runat="server" Text="Gestione Ruoli e Utenti"
                                            <Items> 
                                                <telerik:RadPanelItem runat="server" Text="Ruoli" NavigateUrl="ElencoRuoli.aspx" /> 
                                                <telerik:RadPanelItem runat="server" Text="Utenti" NavigateUrl="ElencoUtenti.aspx" /> 
                                                <telerik:RadPanelItem runat="server" Text="Utenti Schemi" NavigateUrl="ElencoSchemi.aspx" /> 
                                                <telerik:RadPanelItem runat="server" Text="Utenti Uffici" NavigateUrl="ElencoUffici.aspx" /> 
                                            </Items> 
                                        </telerik:RadPanelItem>                                                              
                                    </Items>                         
                            </telerik:RadPanelBar> 
                            </telerik:RadPane> 
                            <telerik:RadSplitBar ID="VerticalSplitBar" runat="server" CollapseMode="Forward" /> 
                            <telerik:RadPane ID="ContentPane" runat="server"
                                  <asp:ContentPlaceHolder ID="cphMain" runat="server"></asp:ContentPlaceHolder> 
                            </telerik:RadPane> 
                        </telerik:RadSplitter> 
                    </telerik:RadPane> 
                </telerik:RadSplitter> 
            </div> 
        </form> 
    </body> 
    </html> 

    i want to select Inserimento Prima Notifica at page load of the page "primanotifica.aspx"

    could you please provide a code snippet for that behavior?

    thanks
    regard
    webster velasco
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 30 Jun 2010 Link to this post

    Hello,

    Try the following code in PageLoad event of primanotifica.aspx page to select particular item in RadPanelBar.

    VB:
     
    Protected Sub Page_Load(sender As Object, e As EventArgs) 
        Dim mPage As MasterPage = Me.Page.Master 
        Dim pBar As RadPanelBar = DirectCast(mPage.FindControl("panelMenu"), RadPanelBar) 
        Dim parentItem As RadPanelItem = TryCast(pBar.FindItemByText("Inserimento Prima Notifica").Parent, RadPanelItem) 
        parentItem.Expanded = True 
        TryCast(parentItem.Parent, RadPanelItem).Expanded = True 
        pBar.FindItemByText("Inserimento Prima Notifica").Selected = True 
    End Sub 
     


    -Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Webster Velasco
    Webster Velasco avatar
    114 posts
    Member since:
    Jun 2012

    Posted 30 Jun 2010 Link to this post

    it didnt work..
  5. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 05 Jul 2010 Link to this post

    Hi Webster,

    Please find attached my test pages based on your code which demonstrates how you can achieve the needed approach.

    All the best,
    Yana
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. Webster Velasco
    Webster Velasco avatar
    114 posts
    Member since:
    Jun 2012

    Posted 05 Jul 2010 Link to this post

    hi

    your answer works..

    but i want to ask 1 more thing

    i want to remove the selected css class on the previous selected item
    thanks regards
    webster
  7. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 08 Jul 2010 Link to this post

    Hi Webster,

    Could you please try  ClearSelectedItems()  method of the panelbar? If it doesn't help, explain in more details the requirement. Thanks

    Best regards,
    Yana
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  8. Webster Velasco
    Webster Velasco avatar
    114 posts
    Member since:
    Jun 2012

    Posted 12 Jul 2010 Link to this post

    it didnt work..

    the previous panel bar is still selected

    anyway

    i was trying to deselect the previous selected panel(which situated at my main.master)
    on my page that is loaded in my main.master
  9. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 15 Jul 2010 Link to this post

    Hello Webster,

    I've attached the modified page to demonstrate how to remove the selection.

    Kind regards,
    Yana
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017