RadPanelBar Won't Expand Inside RadGrid TemplateColumn within NestedViewTemplate

5 posts, 0 answers
  1. Jonathan
    Jonathan avatar
    47 posts
    Member since:
    Sep 2010

    Posted 15 May 2012 Link to this post

    Hi Telerik Team,

    I think I've discovered a bug:

    I have a RadPanelBar inside a GridTemplateColumn of a RadGrid, which is itself inside another RadPanelBar, which is inside the NestedViewTemplate of a containing RadGrid's MasterTableView.

    Background

    I used the NestedViewTemplate of a RadGrid to contain another RadGrid to show child records, because Telerik's default child record view implementation was very difficult to follow for my end users. This was because all the tables at a level were visible at the same time. So I embedded a RadPanelBar inside the NestedViewTemplate of the master RadGrid so that they would only see one RadGrid at a time by expanding/collapsing the RadPanelBar items for each child RadGrid in the NestedViewTemplate. This works beautifully.

    Problem

    One of the child RadGrids in the RadPanelBar in the NestedViewTemplate has a GridTemplateColumn. This GridTemplate column has a RadPanelBar. The RadPanelBar only has one item in it. It will neither expand nor collapse by clicking on the item header. It will however do so if you click the arrow for the item. Also, an attached OnItemClicked event does not fire.

    If I move the RadPanelBar up one level (i.e. outside of the NestedViewTemplate, into a GridTemplateColumn of the master RadGrid), it will expand and collapse normally with only one RadPanelItem in the RadPanelBar. The OnItemClicked event also fires.

    The bug (i.e. refusal to expand/collapse & no OnItemClicked event fire) only seems to appear when the RadPanelBar is inside a GridTemplateColumn of a RadGrid that is inside another RadPanelBar that is inside a NestedViewTemplate of a master RadGrid and it only has one RadPanelItem.

    ...I hope you are following me so far. If not, here's a sample code mockup:

    <telerik:RadGrid ID="MasterRadGrid" runat="server">
       <MasterTableView CommandItemDisplay="Bottom">
          <NestedViewTemplate>
             <telerik:RadPanelBar ID="RadPanelBar1" runat="server">
                <Items>
                   <telerik:RadPanelItem runat="server" Owner="RadPanelBar1" Text="Child Table 1">
                      <ContentTemplate>
                         <telerik:RadGrid ID="ChildRadGrid1" runat="server">
                            <MasterTableView runat="Server" CommandItemDisplay="Bottom">
                               <Columns>
                                  <telerik:GridTemplateColumn HeaderText="Column" UniqueName="Column">
                                     <EditItemTemplate>
                                        <telerik:RadPanelBar ID="RpbColumn" runat="server">
                                           <Items>
                                              <telerik:RadPanelItem runat="server" Owner="RpbColumn">
                                                 <!-- Assorted controls. This RadPanelItem won't expand here, unless in MasterRadGrid -->
                                              </telerik:RadPanelItem>
                                           </Items>
                                        </telerik:RadPanelBar>
                                     </EditItemTemplate>
                                  </telerik:GridTemplateColumn>
                               </Columns>
                            </MasterTableView>
                         </telerik:RadGrid>
                      </ContentTemplate>
                   </telerik:RadPanelItem>
                   <telerik:RadPanelItem runat="server" Owner="RadPanelBar1" Text="Child Table 2">
                      <!--- Another RadGrid -->
                   </telerik:RadPanelItem>
                   <telerik:RadPanelItem runat="server" Owner="RadPanelBar1" Text="Child Table 3">
                      <!--- Another RadGrid -->
                   </telerik:RadPanelItem>
                </Items>
             </telerik:RadPanelBar>
          </NestedViewTemplate>
       </MasterTableView>
    </telerik:RadGrid >

    If I add another RadPanelItem to the deeply nested RadPanelBar (ID = "RpbColumn" in the above example) and set its ExpandMode = "SinglePanelItem", it will expand & collapse normally. I'm using Telerik v. 2011.3.1115.40.

    Can someone please confirm that this is indeed a bug? Thanks in advance.
  2. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 18 May 2012 Link to this post

    Hi Jonathan,

    Can you replicate this issue with the current official version? 

    Could you please isolate the problem in a sample project and send it via a support ticket as this is the best way to help you efficiently?
     
    All the best,
    Peter
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jonathan
    Jonathan avatar
    47 posts
    Member since:
    Sep 2010

    Posted 20 May 2012 Link to this post

    Hi Peter,

    So I upgraded to Telerik v. 2012.Q1 SP1 (2012.1.411.40) and it made absolutely no difference whatsoever, except now, the filter control for DateTime fields render out of wack in RadGrids.

    So I'm reverting back to Telerik v. 2012.Q1 before SP1 (2012.1.215.40). I don't know what you guys changed in SP1, but that needs to be checked out. It seems someone snuck in an old DLL from a much older release in the compile. I'll await Q2 and try again.

    In the mean time, I'll see if I can get that isolated sample project for you.

    Regards,
    Jonathan
  5. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 21 May 2012 Link to this post

    Hello Jonathan,

    About the upgrade issue, please see this forum post and try setting wherever applicable:

    <DateInput ID="DateInput2" runat="server" EnableSingleInputRendering="false" ... />


    Greetings,
    Peter
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  6. Denny
    Denny avatar
    2 posts
    Member since:
    Jul 2012

    Posted 12 Aug 2015 Link to this post

    I recently ran into this problem and not long after reading this thread I found a solution.  While not directly related to the RadPanelBar, this post concerning a nested grid's click event causing its container grid to fire its ItemCommand event led me to think the same may have been happening on the header click of the RadPanelBar.  To solve the issue simply add the following to your RadPanelBar:

    OnClientItemClicked="clientItemClick"

    and handle it as the linked post describes:

    <script type="text/javascript">
         function clientItemClick(sender, eventArgs) {
             eventArgs.get_domEvent().preventDefault();
             eventArgs.get_domEvent().stopPropagation();
         }
     </script>
     

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