How to hide empty Summery Rows

Hello,

I use the GridGroupingControl version 14.4400.0.15.

I want to hide the summary rows of empty tables.
See attached image

How can I do this

kindest regards
Bernhard Höhn

Attachment: HideEmptySummeryRows_a53a43f6.rar

3 Replies

AR Arulpriya Ramalingam Syncfusion Team May 12, 2020 08:40 PM UTC

Hi Bernhard, 
 
Thank you for your interest in Syncfusion products. 
 
The GridGroupingControl does not have any built-in support to hide the summary row for child tables alone. However, this can be achieved by avoiding the child table expanding at run time for the tables that have empty records. We already have provided a KB document to achieve this use case. Please make use of the below KB link for further details. 
 
 
Please let us know, if we misunderstood your requirement. 
 
Regards, 
Arulpriya 



BH Bernhard Höhn May 15, 2020 09:58 AM UTC

I'm sorry, but unfortunately this is not working out the way I would like it to.

to show all groups already opened I use the following method

grdAnzeige.GetTable("tblNation").ExpandAllRecords();

If I set an empty group to "static" with the given function, without the above method only the headline of the group is displayed.
However, when I use ExpandAllRecords(), column headers and group total are still displayed.

This is not what I wanted.
In my opinion, this is not useful either.

How can I turn it off?

Translated with www.DeepL.com/Translator (free version)


AR Arulpriya Ramalingam Syncfusion Team May 19, 2020 01:42 AM UTC

Hi Bernhard, 
 
Thank you for the update. 
 
We could understand the scenario and the GridGroupingControl does not have built in support to remove the child tables when it has 0 records. However, the reported scenario can be handled by using the RecordExpanding event. Please make use of the below sample code for further details. 
 
Example code 
 
//Event subscription 
this.gridGroupingControl1.Table.RecordExpanding += Table_RecordExpanding; 
 
private void Table_RecordExpanding(object sender, Syncfusion.Grouping.RecordEventArgs e) 
{ 
    //To restrict the expand when the records are expanded programmatically. 
    if (e.Record.NestedTables.Count > 0 && e.Record.NestedTables[0].Records.Count == 0) 
    { 
        e.Cancel = true; 
    } 
} 
 
Please let us know, if you have any other queries. 
 
Arulpriya 


Loader.
Up arrow icon