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

Hide headers

Hello,

Are there any way to hide all the columns headers?

Thanks!

3 Replies

SR Sellappandi Ramu Syncfusion Team November 27, 2015 06:15 AM UTC

Hi Jorge,

Thanks for contacting Syncfusion support.

We can achieve your requirement by using create event. In this event will trigger after the grid creation.

Refer to the online help documentation for create event.

Document: http://help.syncfusion.com/js/api/ejgrid#events:create

Please refer to the code example and sample,

    <ej:grid id="FlatGrid" runat="server" allowscrolling="true">

        <ScrollSettings Height="400" Width="880" ></ScrollSettings>

        <Columns>

               <ej:Column Field="OrderID" HeaderText="Order ID" IsPrimaryKey="true" TextAlign="Right" Width="90">                   

               </ej:Column>

               <ej:Column Field="CustomerID" HeaderText="Customer ID" Width="90">                  

               </ej:Column>              

               <ej:Column Field="EmployeeID" HeaderText="Employee ID" Width="110"></ej:Column>

               <ej:Column Field="ShipCity" HeaderText="ShipCity" Width="90" />

            </Columns>          

        <ClientSideEvents Create="create" />

          

    </ej:grid>

    <script type="text/javascript">

        function create(args) {

            this.getHeaderContent().addClass("e-hide");

            this.getContent().css("border-top", "1px solid #c8c8c8");

        }
    </script>


Sample: http://www.syncfusion.com/downloads/support/forum/121286/ze/Sample_1212861265772011

Regards,
Sellappandi R


JP Jorge Pampin November 27, 2015 07:44 AM UTC

Hello,

It's perfect! Thank you very much!


SR Sellappandi Ramu Syncfusion Team November 30, 2015 05:46 AM UTC

Hi Jorge, 

Thanks for the update.

Please get back to us if you need any further assistance.  

Regards, 

Sellappandi R


Loader.
Up arrow icon