Is there anyway to hide JUST the detail grid headers when using the KendoGrid option

1 Answer 31 Views
Grid
George
Top achievements
Rank 2
Iron
Iron
Iron
George asked on 22 Aug 2023, 10:08 PM

Hi,

When using the detailInit event... I was wondering if it is possible to hide ONLY the child or details grid?

I tried this:

$('.k-grid-header').hide();

...but it will hide alll the headers of every grid on the html page.

And this:

$('#hiarchGrid .k-grid-header').hide();

but it just removes all the headers for the grid with the given id; both parent and details.

I have attached my code in text format.

1 Answer, 1 is accepted

Sort by
0
Accepted
Zornitsa
Telerik team
answered on 25 Aug 2023, 02:33 PM

Hi George,

In order to hide the headers only for the detail grids, you can access them with the ".k-grid tbody .k-grid .k-grid-header" class and then set the display property to "none":

 

<style>
     .k-grid tbody .k-grid .k-grid-header
    {
        display: none;
    }
</style>

Below is a Dojo example, using your provided code, in which you can see the desired behavior:

Let me know if you have more questions.

Regards,
Zornitsa
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources
George
Top achievements
Rank 2
Iron
Iron
Iron
commented on 25 Aug 2023, 02:47 PM

Zornitsa-
Yes, EXACTLY what I needed this should work.  Thanks! --Geo
Tags
Grid
Asked by
George
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Zornitsa
Telerik team
Share this question
or