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

Nested Grid Will Not Collapse

3 Answers 135 Views
Grid
This is a migrated thread and some comments may be shown as answers.
bill
Top achievements
Rank 1
bill asked on 29 Jun 2010, 09:42 PM



- i can expand each grid row to see the nested table
- if i click on another row it closes the first
- however i have no way to close them all. i can not close the current one by clicking it again

   <telerik:RadGrid ID="RadGrid1" runat="server"  AutoGenerateColumns="False" Width="75%"   
                    Skin="Hay" HorizontalAlign="Center" AllowMultiRowSelection="False" 
         AllowPaging="True" PageSize="5" GridLines="None" AllowMultiColumnSorting="True"   
                    > 
        <MasterTableView  DataKeyNames="ContentID"   
            GroupLoadMode="Server">  
            <Columns> 
                <telerik:GridBoundColumn DataField="Question" HeaderText="About" SortExpression="Question" 
                    UniqueName="Question">  
                </telerik:GridBoundColumn> 
            </Columns> 
           
            <NestedViewSettings> 
                <ParentTableRelation> 
                    <telerik:GridRelationFields DetailKeyField="ContentID" MasterKeyField="ContentID" /> 
                </ParentTableRelation> 
            </NestedViewSettings> 
            <NestedViewTemplate> 
                <asp:Panel ID="NestedViewPanel" runat="server"  CssClass="viewWrap">  
                    <div class="contactWrap">  
                        <fieldset style="padding: 2px;">  
                            <legend style="padding: 2px;"><b>Answer</b> 
                            </legend> 
                           <table> 
                                
                                    <tr> 
                                        <td> 
                                            <table> 
                                               
                                                    <tr> 
                                                        <td> 
                                                            <asp:Label ID="cityLabel" Text='<%#Bind("Answer") %>' runat="server"></asp:Label> 
                                                        </td> 
                                                    </tr> 
                                                    <tr> 
                                            
                                            </table> 
                                        </td> 
                                    </tr> 
                                 
                            </table> 
                        </fieldset> 
                    </div> 
                </asp:Panel> 
            </NestedViewTemplate> 
        </MasterTableView> 
        <PagerStyle Mode="NumericPages"></PagerStyle> 
      
    </telerik:RadGrid> 

3 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 30 Jun 2010, 02:17 PM
Hi bill,

I followed your scenario in order to replicate the issue you are facing, but to no avail. Please find attached a simple runnable project, which is working as expected. Give it a try and let me know if it helps to resolve the problem.

Regards,
Pavlina
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
0
Manoj
Top achievements
Rank 1
answered on 08 Sep 2010, 05:43 PM
Hello Bill,

Were you able to get the collapse issue sorted out? I am facing the same issue, but not able to find a solution. Could you please help?
0
Bill Spaulding
Top achievements
Rank 1
answered on 08 Sep 2010, 07:39 PM
Manoj,

   If im not mistaken i used the solution provided by Pavlina. If you notice there is a download link to a sample soltuion
Tags
Grid
Asked by
bill
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Manoj
Top achievements
Rank 1
Bill Spaulding
Top achievements
Rank 1
Share this question
or