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

[Solved] Hierarchical Grid - how to hide non child parent expand toggle?

3 Answers 384 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Phi Kong
Top achievements
Rank 1
Phi Kong asked on 22 Oct 2009, 10:06 AM
Hi,

I have setup a Hierarchical Grid.  Following the example from - http://demos.telerik.com/aspnet-ajax/grid/examples/programming/detailtabledatabind/defaultcs.aspx

Not all my parent rows has childrens.  When the parent do not have a child, it automatically displays and adds a "no child" row.  Is there a way to disable/hide this row?

I have attached a screenshot of what I mean.

Thanks,
Phi

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 22 Oct 2009, 11:52 AM
Hi Phi Kong,

Try setting the "NoDetailRecordsText" property to null for GridTableView in order to hide the No Records text.

aspx:
 
<telerik:GridTableView DataKeyNames="OrderID" NoDetailRecordsText="" Name="Detail1" DataSourceID="SqlDataSource2"

-Shinu.


0
Phi Kong
Top achievements
Rank 1
answered on 22 Oct 2009, 12:36 PM
Hi Shinu,

Thank you for replying.

Setting the property did hide the text.  However the row still appears.  Is there a way to hide the row altogether?

I have attached a screenshot of what it looks like now.

Phi
0
Princy
Top achievements
Rank 2
answered on 22 Oct 2009, 12:54 PM
Hello Phi,

I have a suggestion which is to avoid expanding the parent row when there are no child records to display for the corresponding parent by hiding the expand/collapse images. Refer to the following help document to understand how to get this done:
Hiding expand/collapse images when no records

Thanks
Princy.
Tags
Grid
Asked by
Phi Kong
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Phi Kong
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Share this question
or