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. Image for the cookie policy date

Grid with stacked headers and first column like a tree

Hello,

I d like to add a tree in my first column like TreeGrid. TreeGrid permits to do it but I cannot to add stacked headers in this component.
I know the Hierarchy action but I want an action like the TreeGrid.
With a Grid, can I to do a tree column ? Or with a TreeGrid can I to add stacked headers.
Then, is there an oher component to do these two things ??

Thank you for your help.

F.

3 Replies

SS Seeni Sakthi Kumar Seeni Raj Syncfusion Team September 11, 2017 11:09 AM UTC

HI Fabrice,  
 
Thanks for contacting Syncfusion Support.  
 
Query #1: Hierarchy Grid with the Stackedheader columns 
 
We have rendered a child Grid with the stackedheader columns and rows. Refer to the following code example.  
 
@using Syncfusion.JavaScript.Models; 
 
<ej-grid id="Grid" datasource=ViewBag.parent allow-paging="true" show-stacked-header="true" 
         child-grid="@(new GridProperties() { 
    QueryString = "EmployeeID", 
    ShowStackedHeader=true, 
    StackedHeaderRows = new List<StackedHeaderRow>() { 
        new StackedHeaderRow() { 
            StackedHeaderColumn = new List<StackedHeaderColumn>() { 
         new StackedHeaderColumn() { 
              Column= new List<string>() { "EmployeeID", "CustomerID", "ID"  }, 
              HeaderText = "Employee Details" 
 
        } }  } 
    }, 
          . ..  
                  . . 
})" 
         > 
    <e-stacked-header-rows> 
        <e-stacked-header-row> 
            <e-stacked-header-columns> 
                <e-stacked-header-column column='@new List<string>() { "EmployeeID","FirstName","LastName"  }' header-text="Employee Details" /> 
                <e-stacked-header-column column='@new List<string>() { "Country"  }' header-text="Employee Address"/> 
            </e-stacked-header-columns> 
        </e-stacked-header-row> 
    </e-stacked-header-rows> 
         . . . 
             . . . 
</ej-grid> 
 
We have prepared a sample that can be downloaded from the following location.  
 
 
We can also programmatically expand or collapse the childGrids using the expandCollapse method. Refer to the following API Reference section. 
 
 
Query #2: with a TreeGrid can I to add stacked headers 
 
At present, there is no support for stacked header columns in a TreeGrid, for this we have already logged a feature report regarding this.  This feature will be implemented and included in our upcoming Volume 4 main release which will be expected to out at end of October, 2017. Please let us know if you require further assistance on this. 
 
Regards,  
Seeni Sakthi Kumar S. 



FA Fabrice September 14, 2017 08:40 AM UTC

Thank you :)



SS Seeni Sakthi Kumar Seeni Raj Syncfusion Team September 15, 2017 04:53 AM UTC

Hi Fabrice,  
 
Thanks for the update. Please get back to us, if you require further assistance on this.  
 
Regards,  
Seeni Sakthi Kumar S. 


Loader.
Live Chat Icon For mobile
Up arrow icon