Handling Dynamic Grid Height to Freaze Header

Dear Team,

I am unable to handle grid height, once i am giving grid height to 200 its excluding the header height .

How to automatically set the container remaining available height to grid.

1 Reply

SK Sujith Kumar Rajkumar Syncfusion Team March 3, 2020 11:19 AM UTC

Hi Deepak, 
 
Greetings from Syncfusion support. 
 
By default the value defined in the grid’s height property is set to the grid content and not considered for the header area since the toolbar in the header section can be assigned with custom items or custom toolbar can also be rendered. This is the grid’s behavior. Based on the provided information we suspect your query is on how to set a particular height to the whole grid and if so you can achieve this requirement by setting grid height to 100% and then defining the required height to its parent property(which will be set for the grid). 
 
<div id='gridParent'> 
    <ejs-grid #normalgrid height='100%' id='Normalgrid' [dataSource]='data'> 
    </ejs-grid> 
</div> 
 
#gridParent { 
        height: 500px; 
} 
 
We have prepared a sample based on this for your reference which you can find below, 
 
 
If we misunderstood your query or if you require any further assistance, please get back to us. 
 
Regards, 
Sujith R 


Loader.
Up arrow icon