Panel Behavior

7 posts, 0 answers
  1. Wendy Hunt
    Wendy Hunt avatar
    50 posts
    Member since:
    Nov 2009

    Posted 28 Dec 2009 Link to this post


    I have created a panelbar that has 3 sections.  The second section always comes up when the page is loaded.  I would like for the 1st to come up instead.  What properties would I set to make this happen?  I have had various properties set before and nothing has helped so far.  One that I was using is [  Selected="true"  ] for the section I wanted to open up on when the page loads, but to no avail.

    <telerik:RadPanelBar runat="server" ID="RadPanelBar1" ExpandMode="SingleExpandedItem" Width="800px" Height="750px">     
            <Items>    
              <telerik:RadPanelItem Text="Project Search" runat="server" Selected="true" Font-Bold="true">      
                <Items>    
                  <telerik:RadPanelItem Value="ProjectSearch" runat="server">     
                    <ItemTemplate>    
                       ...     
                    </ItemTemplate>    
                  </telerik:RadPanelItem>    
                </Items>    
              </telerik:RadPanelItem>    
              <telerik:RadPanelItem Text="Contract Search" runat="server" Font-Bold="true">     
                <Items>    
                  <telerik:RadPanelItem Value="ContractSearch" runat="server">     
                    <ItemTemplate>    
                      ...     
                    </ItemTemplate>    
                  </telerik:RadPanelItem>    
                </Items>    
              </telerik:RadPanelItem>    
              <telerik:RadPanelItem Text="SOI Search" runat="server" Font-Bold="true">     
                <Items>    
                  <telerik:RadPanelItem Value="SOISearch" runat="server">     
                    <ItemTemplate>    
                      ...     
                    </ItemTemplate>    
                  </telerik:RadPanelItem>    
                </Items>    
              </telerik:RadPanelItem>    
            </Items>    
            <CollapseAnimation Duration="100" Type="None" />    
            <ExpandAnimation Duration="100" Type="InElastic" />    
        </telerik:RadPanelBar>   

    FYI - I would like to use the aspx-side to set these properties instead of the cs-side.

    Any help would be great.  Thanks!
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 28 Dec 2009 Link to this post

    Hello Wendy,

    Set the Expanded property to true for the RadPanelItem that you want to open when page is loaded.

    aspx:
     
    <telerik:RadPanelBar runat="server" ID="RadPanelBar1" ExpandMode="SingleExpandedItem" Width="800px" Height="750px">      
        <Items>     
          <telerik:RadPanelItem Text="Project Search" runat="server" Expanded="true" Selected="true" Font-Bold="true">       
            <Items>     
              <telerik:RadPanelItem Value="ProjectSearch" runat="server">      
                <ItemTemplate>     
                   ...      
                </ItemTemplate>     
              </telerik:RadPanelItem>     
            </Items>     
          </telerik:RadPanelItem>     
          . . . 
        </Items>   
    </telerik:RadPanelBar>   

    -Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Wendy Hunt
    Wendy Hunt avatar
    50 posts
    Member since:
    Nov 2009

    Posted 29 Dec 2009 Link to this post

    Hi Shinu -

    It didn't work.  Any other suggestions?

    Thanks!
  5. Kamen Bundev
    Admin
    Kamen Bundev avatar
    1532 posts

    Posted 29 Dec 2009 Link to this post

    Hi Wendy,

    I've tested it with your markup and Expanded="true" set on your first RadPanelItem and it worked as it should. Can you post your markup after applying the fix? Thank you in advance.

    Regards,
    Kamen Bundev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  6. Wendy Hunt
    Wendy Hunt avatar
    50 posts
    Member since:
    Nov 2009

    Posted 29 Dec 2009 Link to this post



    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" style="z-index:1; position:absolute; top:150px;left:50px;">  
          <telerik:RadPanelBar runat="server" ID="RadPanelBar1" ExpandMode="SingleExpandedItem" Width="800px" Height="750px">  
            <Items> 
              <telerik:RadPanelItem Text="Project Search" runat="server" Expanded="true" Selected="true" Font-Bold="true">   
                <Items> 
                  <telerik:RadPanelItem Value="ProjectSearch" runat="server">  
                    <ItemTemplate> 
                      <div> 
                        <br /> 
                        &nbsp;&nbsp;<asp:Label ID="Label9" runat="server" Text="Project Name:" style="width: 113px; text-align: right;"></asp:Label><br /> 
                            
                        &nbsp;&nbsp;<telerik:RadComboBox ID="projectNameRadComboBox" runat="server" AutoPostBack="true"  ZIndex="99999" Width="500px" Height="150"></telerik:RadComboBox><br /> 
     
                        &nbsp;&nbsp;<asp:Label ID="Label2" runat="server" Text="Identifier:"></asp:Label><br /> 
                           
                        &nbsp;&nbsp;<asp:TextBox ID="identifierTextBox" runat="server" Width="250px"></asp:TextBox><br /> 
                          
                        &nbsp;&nbsp;<asp:Label ID="Label13" runat="server" Text="Project Group:" style="text-align: right;"></asp:Label><br /> 
                            
                        &nbsp;&nbsp;<telerik:RadComboBox ID="projectGroupRadComboBox" runat="server"  ZIndex="99999" Width="500px" Height="150"></telerik:RadComboBox><br /><br /> 
                          
                        &nbsp;&nbsp;<asp:Button ID="projectSearchButton" runat="server" Text="Search" SkinID="smallGreenButton" Width="50px" onclick="projectSearchButton_Click" /><br /> 
                        <br /> 
                        <telerik:RadGrid ID="projectRadGrid" runat="server"   
                                       
                          AllowSorting="True" GridLines="None"   
                          AllowPaging="True" AllowFilteringByColumn="True" ShowGroupPanel="True"  > 
                          <MasterTableView AutoGenerateColumns="False">  
                            <RowIndicatorColumn> 
                              <HeaderStyle Width="20px" /> 
                            </RowIndicatorColumn> 
                            <ExpandCollapseColumn> 
                              <HeaderStyle Width="20px" /> 
                            </ExpandCollapseColumn> 
     
                            <Columns> 
                                <telerik:GridBoundColumn DataField="Name" HeaderText="Name"></telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="Identifier" HeaderText="Identifier"></telerik:GridBoundColumn> 
                            </Columns> 
     
                          </MasterTableView> 
                          <ClientSettings AllowDragToGroup="True">  
                            <Scrolling AllowScroll="True" UseStaticHeaders="True" /> 
                          </ClientSettings>                     
                                      
                        </telerik:RadGrid> 
                      </div> 
                    </ItemTemplate> 
                  </telerik:RadPanelItem> 
                </Items> 
              </telerik:RadPanelItem> 
              <telerik:RadPanelItem Text="Contract Search" runat="server" Font-Bold="true">  
                <Items> 
                  <telerik:RadPanelItem Value="ContractSearch" runat="server">  
                    <ItemTemplate> 
                      <div> 
                         <br /> 
                        &nbsp;&nbsp;<asp:Label ID="Label11" runat="server" Text="Contract Number:" 
                          style="width: 119px;"></asp:Label><br /> 
                        &nbsp;&nbsp;<asp:TextBox ID="contractNumberTextBox" runat="server" Width="250px"></asp:TextBox><br /> 
                          
                        &nbsp;&nbsp;<asp:CheckBox ID="executedCheckBox" runat="server" Text="Executed" 
                          style="width: 92px;" /><br /> 
                        &nbsp;&nbsp;<asp:CheckBox ID="terminatedCheckBox" runat="server" Text="Terminated" 
                          style="width: 99px;" /><br /><br /> 
                          
                        &nbsp;&nbsp;<asp:Button ID="contractSearchButton" runat="server" Text="Search" Width="50px"   
                          SkinID="smallGreenButton" onclick="contractSearchButton_Click" /><br /><br /> 
                          
                        <telerik:RadGrid ID="contractRadGrid" runat="server"   
                            GridLines="None" AllowSorting="True"   
                            AllowFilteringByColumn="True" AllowPaging="True" ShowGroupPanel="True"  > 
                          <MasterTableView AutoGenerateColumns="False">  
                            <RowIndicatorColumn> 
                              <HeaderStyle Width="20px" /> 
                            </RowIndicatorColumn> 
                            <ExpandCollapseColumn> 
                              <HeaderStyle Width="20px" /> 
                            </ExpandCollapseColumn> 
     
                            <Columns> 
                                <telerik:GridBoundColumn DataField="ContractNumber" HeaderText="Contract #"></telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="Executed" HeaderText="Executed"></telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="Terminated" HeaderText="Terminated"></telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="RequestedBy" HeaderText="Requested By"></telerik:GridBoundColumn> 
                                  
                            </Columns> 
                            
                          </MasterTableView> 
                          <ClientSettings AllowDragToGroup="True">  
                            <Scrolling AllowScroll="True" UseStaticHeaders="True" /> 
                          </ClientSettings> 
                        </telerik:RadGrid> 
            
     
                      </div> 
                    </ItemTemplate> 
                  </telerik:RadPanelItem> 
                </Items> 
              </telerik:RadPanelItem> 
              <telerik:RadPanelItem Text="SOI Search" runat="server" Font-Bold="true">  
                <Items> 
                  <telerik:RadPanelItem Value="SOISearch" runat="server">  
                    <ItemTemplate> 
                      <div> 
                        <br /> 
                         &nbsp;&nbsp;<asp:Label ID="Label4" runat="server" Text="Tier:"></asp:Label><br /> 
                        &nbsp;&nbsp;<telerik:RadComboBox ID="tierRadComboBox" runat="server" ZIndex="99999" EnableViewState="True" 
                          Width="350px" Height="150">  
                        </telerik:RadComboBox><br /> 
                          
                        &nbsp;&nbsp;<asp:Label ID="Label5" runat="server" Text="Lead Organization:" 
                          style="width: 123px; text-align: right;"></asp:Label><br /> 
                        &nbsp;&nbsp;<telerik:RadComboBox ID="leadOrganizationRadComboBox" runat="server" ZIndex="99999" EnableViewState="True" 
                          Width="350px" Height="150">  
                        </telerik:RadComboBox> <br /> 
                          
                        &nbsp;&nbsp;<asp:Label ID="Label6" runat="server" Text="Project Group:" 
                          style="text-align: right; width: 121px;"></asp:Label><br /> 
                        &nbsp;&nbsp;<telerik:RadComboBox ID="projectGroup2RadComboBox" runat="server" ZIndex="99999" 
                          Width="350px" Height="150">  
                        </telerik:RadComboBox><br /> 
                          
                        &nbsp;&nbsp;<asp:Label ID="Label7" runat="server" Text="Submit Date:" 
                          style="width: 94px;"></asp:Label><br /> 
                        &nbsp;&nbsp;<telerik:RadDatePicker ID="submitDateRadDatePicker" runat="server"   
                          SkinID="greenTelerikCalendar" > 
                        </telerik:RadDatePicker><br /> 
                          
                        &nbsp;&nbsp;<asp:Label ID="Label10" runat="server" Text="Participating Entity:" 
                          style="width: 131px;"></asp:Label><br /> 
                        &nbsp;&nbsp;<telerik:RadComboBox ID="participatingEntityRadComboBox" runat="server" ZIndex="99999" 
                          Width="350px" Height="150">  
                        </telerik:RadComboBox><br /> 
                                  
                        &nbsp;&nbsp;<asp:Label ID="Label15" runat="server" Text="Requesting Entity:" 
                          style="width: 133px;"></asp:Label><br /> 
                        &nbsp;&nbsp;<telerik:RadComboBox ID="requestingEntityRadComboBox" runat="server" ZIndex="99999" 
                          Width="350px" Height="150">  
                        </telerik:RadComboBox><br /><br />          
                          
                        &nbsp;&nbsp;<asp:Button ID="SOISearchButton" runat="server" Text="Search"   
                          onclick="SOISearchButton_Click" SkinID="smallGreenButton" Width="50px" /><br /><br /> 
                          
                          
                       <telerik:RadGrid ID="SoiRadGrid" runat="server"   
                          AllowSorting="True" GridLines="None"   
                          AllowFilteringByColumn="True" AllowPaging="True" ShowGroupPanel="True">  
                          <MasterTableView AutoGenerateColumns="False">  
                            <RowIndicatorColumn> 
                              <HeaderStyle Width="20px" /> 
                            </RowIndicatorColumn> 
                            <ExpandCollapseColumn> 
                              <HeaderStyle Width="20px" /> 
                            </ExpandCollapseColumn> 
     
                            <Columns> 
                                <telerik:GridBoundColumn DataField="Tier" HeaderText="Tier"></telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="Org" HeaderText="Org"></telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="ProjectGroup1" HeaderText="Project Group"></telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="RequestingEntity" HeaderText="Req Entity"></telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="SubmittalDate" HeaderText="Submittal Date"></telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="ContactInfo" HeaderText="Contact Info"></telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="Unredacted" HeaderText="Unredacted"></telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="Redacted" HeaderText="Redacted"></telerik:GridBoundColumn> 
                            </Columns> 
                            
                          </MasterTableView> 
                          <ClientSettings AllowDragToGroup="True">  
                            <Scrolling AllowScroll="True" UseStaticHeaders="True" /> 
                          </ClientSettings> 
                        </telerik:RadGrid>   
                      </div> 
                    </ItemTemplate> 
                  </telerik:RadPanelItem> 
                </Items> 
              </telerik:RadPanelItem> 
            </Items> 
            <CollapseAnimation Duration="100" Type="None" /> 
            <ExpandAnimation Duration="100" Type="InElastic" /> 
        </telerik:RadPanelBar> 
      </telerik:RadAjaxPanel> 

    I tried to do a view source and paste the code from the page while running but it won't let me paste that much content.

    Thanks!  
    wen 
  7. Kamen Bundev
    Admin
    Kamen Bundev avatar
    1532 posts

    Posted 04 Jan 2010 Link to this post

    Hello Wendy,

    Happy new 2010 year.

    I placed your code in a page, removed the button onclick events and tried it, but it works as expected - always showing the first RadPanelBarItem open on load/refresh. Tested in IE7/8 and Firefox. I'm attaching the resulting page for your reference.

    You can't attach files to a forum thread. If you want, I can convert this thread to a support ticket in which you can attach your saved page (or you can file a new support ticket with a reference to this thread).

    Regards,
    Kamen Bundev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  8. Wendy Hunt
    Wendy Hunt avatar
    50 posts
    Member since:
    Nov 2009

    Posted 04 Jan 2010 Link to this post

    Hi Kamen -

    Thank you for your response.
    I went ahead and opened a support ticket last week.  The ticket number is 269998. 

    wen
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017