We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Hide expandable group header

Thread ID:

Created:

Updated:

Platform:

Replies:

132650 Sep 13,2017 11:18 PM UTC Sep 14,2017 05:58 PM UTC WPF 1
loading
Tags: SfDataGrid
Erik
Asked On September 13, 2017 11:18 PM UTC

Hi,

I'm grouping the data like the documentation says:

           <Syncfusion:SfDataGrid.GroupColumnDescriptions >
                <Syncfusion:GroupColumnDescription ColumnName="MyRowId"  />
            </Syncfusion:SfDataGrid.GroupColumnDescriptions>

It's working fine but it's not completely what I'm looking for.

This piece of code makes the view of the datagrid richer with an expandable row which can be clicked to show the grouped data (or AutoExpandGroups on control).

Is there a way to hide the expandable group row? So it is always automatically expanded and that this expandable row is not visible?

Thanks!

Muthukumar Kalyanasundaram [Syncfusion]
Replied On September 14, 2017 05:58 PM UTC

Hi Erik, 

Thank you for contacting Syncfusion support. 

You can able to hide the expander row(Caption Summary Row) by handling the QueryRowHeight event of SfDataGrid as like the below codes. 

Code Snippet

this.sfGrid.QueryRowHeight += SfGrid_QueryRowHeight; 
 
private void SfGrid_QueryRowHeight(object sender, QueryRowHeightEventArgs e) 
{ 
    var groupRow = (sfGrid.RowGenerator.Items.FirstOrDefault(x => x.RowIndex == e.RowIndex && (x.RowType == RowType.SummaryRow || x.RowType == RowType.SummaryCoveredRow 
    || x.RowType == RowType.CaptionCoveredRow || x.RowType == RowType.CaptionRow))); 
    if (groupRow != null) 
    { 
        e.Height = 0; 
        e.Handled = true; 
    } 
} 



If your requirement is different from this, could you please share some more information about your requirement clearly ?.  This would be more helpful for us to proceed further.   
 
Regards, 
Muthukumar K 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;