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

Expand/Collapse button not show for Master Grid

2 Answers 194 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Phat
Top achievements
Rank 1
Phat asked on 03 Mar 2015, 10:49 AM
Hi all, 

I'm working with Telerik Web UI 2014.2.724.45
My Master Grid has some Sub Grids, but the Expand/Collapse button not show even though the Sub Grids have values

I used IE Developer Tool to view HTML source and found that the "<tr>" has inline style "display: none;" I remove this style then the Sub Grids appears.
Also, as I observed, the Sub Grids have Expand/Collapse button for their Sub Grids (level2). (see attachment)

---------------------------------------------------------------------
PrintableRadGrid inherits RadGrid

<trstk:PrintableRadGrid id="ListRadGrid" AutoGenerateHierarchy="false" AutoGenerateColumns = "false"
     AllowPaging="true" OnItemCreated="ListRadGrid_ItemCreated" OnNeedDataSource="ListRadGrid_NeedDataSource"
     OnDetailTableDataBind="ListRadGrid_DetailTableDataBind" runat="server" Visible="false">
     <MasterTableView NoDetailRecordsText="No records to Display" HierarchyLoadMode="Client"
      PageSize="10" AllowCustomPaging="true" AutoGenerateColumns="false" TableLayout="Auto">
     </MasterTableView>
     <PagerStyle AlwaysVisible="true" />
   </trstk:PrintableRadGrid>

Please help.

2 Answers, 1 is accepted

Sort by
0
Phat
Top achievements
Rank 1
answered on 03 Mar 2015, 11:54 AM
I bind Master view by NeedDataSource event
Then run DetailTableDataBind event for loading Sub Grid.

When view HTML for Master Grid, I don't see the element <td class="rgExpandCol"> in the <table> of Master Grid. But the Sub Grids have this element.
I think code behind does not generate Expand/Collapse column for Master Grid but not sure about the root cause.

Thanks
0
Konstantin Dikov
Telerik team
answered on 06 Mar 2015, 07:26 AM
Hello Phat,

From the provided information only it would be impossible to determine what is causing the issue on your end. Additionally, please note that we do not support custom controls, even if they inherit controls from our suite and it is possible that the problem is related to the custom control. I could suggest that you try with standard RadGrid and see if you will observe the same issue.

Finally, you could inspect the Columns collection of the MasterTableView within the PreRender event of the grid and see if the Collapse/Expand column is present in it.


Regards,
Konstantin Dikov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Phat
Top achievements
Rank 1
Answers by
Phat
Top achievements
Rank 1
Konstantin Dikov
Telerik team
Share this question
or