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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Hide Grid Header Row when the column uses a jsrender Template is not working

Thread ID:





131273 Jul 3,2017 02:02 AM UTC Jul 13,2017 10:46 AM UTC ASP.NET Core 5
Tags: Grid
Asked On July 3, 2017 02:02 AM UTC

Hi Support:

I have a grid with only one column defined a template as:

       <e-column template="#detailTemplate"></e-column>

But the following code is ignored:

function onDatabound(args) {
            //hide Grid header

There is no error, but the header does not get hidden.

Thanks in advanced


Farveen Sulthana Thameeztheen Basha [Syncfusion]
Replied On July 3, 2017 05:27 PM UTC

Hi customer, 

Thanks for contacting syncfusion support. 

You can hide the Header of the template column by using “data-bound” event of the Grid. In the below code example we have bound the “data-bound” event for the grid and from that we have remove the header element of grid using “getHeaderTable” method in grid.  
Please refer to the code example:- 
<ej-grid id="FlatGrid" allow-paging="true" data-bound="bound" datasource="ViewBag.DataSource"> 
          <e-column field="OrderID" template="#detailTemplate" is-primary-key="true"></e-column> 
          <e-column field="EmployeeID"></e-column> 
          <e-column field="CustomerID"></e-column> 
          <e-column field="Freight"></e-column> 
            function bound(args) { 
Please get back to us if you need any further assistance. 


Farveen sulthana

Replied On July 5, 2017 08:38 PM UTC

Hi Farveen :

I tried your suggestion but it did not work.

To remove the header row I added the following css, but is not an elegant solution, so I prefer to make it to work with your approach:

 .e-headercell, .e-headercelldiv, .e-gridheader


        height:0 !important;

        border:0 !important;


My Grid definition is:

 <ej-grid id="grid1"










                           <e-datamanager url="/DataSource" adaptor="UrlAdaptor" />


                                <e-column template="#detailTemplate"></e-column>


                            <e-page-settings page-size="10"></e-page-settings>


What could be my issue.



Farveen Sulthana Thameeztheen Basha [Syncfusion]
Replied On July 6, 2017 03:52 PM UTC

Hi David, 

We are unable to reproduce your reported problem “Grid Header doesn’t get hide’ at your end. Could you please share us the following details to find the cause of the issue. 

1. Grid code example( share the code example of data-bound event ). 

2. Have you used any customized CSS for Grid. If so please share the code. 

3. Screenshot or Video if any script error occurs.  

The provided information will help us to analyze and provide you the solution as early as possible. 
Farveen sulthana T 

Replied On July 12, 2017 03:59 PM UTC

Thanks Farveen.

Now is working as expected.

Farveen Sulthana Thameeztheen Basha [Syncfusion]
Replied On July 13, 2017 10:46 AM UTC

Hi David, 
Thanks for your update that your reported problem was resolved. 
Please get back to us if you need any further assistance. 
Farveen sulthana T 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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