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

Nested grid hide no child records

2 Answers 60 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Iron
Daniel asked on 01 Oct 2010, 04:22 AM
Hi. I've got several radgrids inside a radajaxpanel. Some are shown or hidden based on rows selected in other grids. I've populated the nested grids with data from the code behind based on http://demos.telerik.com/aspnet-ajax/grid/examples/programming/detailtabledatabind/defaultcs.aspx example. I've also followed http://www.telerik.com/help/aspnet-ajax/grdhideexpandcollapseimageswhennorecords.html help article on how to hide child grids if no records exist. This works okay for a static nested grid. But not all my grids are populated with data on page load as I've stated above. It hides all child grids as the rowcount is obviously zero because they weren't populated with data initially. I've tried using the code inside the needdatasource details table routine but it yields the same results. Is there any way around this? Maybe on the client side? Thanks.

Daniel

2 Answers, 1 is accepted

Sort by
0
Diego
Top achievements
Rank 1
answered on 08 Oct 2010, 02:28 AM
Mate, can you post some self-contained snippets that shed some light on your scenario? I'm confident this will help other members of this forum as well.
0
Daniel
Top achievements
Rank 1
Iron
answered on 08 Oct 2010, 02:54 AM
Hi Diego. I ended up rendering two grids, one with nested tables and one without and hide/show the grids based on the rowcount from the nested table. The grids never contain more than ten rows each, only ever have one nested table and have no paging or sorting enabled so it doesn't impact peformance too much.

Daniel
Tags
Grid
Asked by
Daniel
Top achievements
Rank 1
Iron
Answers by
Diego
Top achievements
Rank 1
Daniel
Top achievements
Rank 1
Iron
Share this question
or