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

Grid : Height to fit screenheight automatically

Thread ID:





144871 May 27,2019 10:09 AM UTC Jan 3,2020 01:22 PM UTC Blazor 3
Tags: Grid
Asked On May 27, 2019 10:09 AM UTC

Dear Syncfusion,

is it possible to set the height of the grid to 100% , so it fits the screen vertically ?


Thavasianand Sankaranarayanan [Syncfusion]
Replied On May 28, 2019 11:19 AM UTC

Hi Gert, 
Thanks for contacting Syncfusion support. 
Query 1: is it possible to set the height of the grid to 100% , so it fits the screen vertically ? 
Yes, it is possible to set height of the grid to “100%”. We have prepared a sample where the grid fits the screen vertically. Please refer the below code snippet and sample link. 
<EjsGrid id="Grid" DataSource="@gridData" Height="100%" >     
        <GridColumn Field="OrderID" HeaderText="Order ID" IsPrimaryKey="true" TextAlign="@TextAlign.Right" Width="120"></GridColumn> 
        .   .   .   . 
@functions { 
    public object gridData { get; set; } 
    protected override void OnInit() 
        gridData = OrdersDetails.GetAllRecords(); 
Please get back to us for further assistance. 
Thavasianand S. 

Devware GmbH
Replied On January 2, 2020 07:01 PM UTC

Hello Thavasianand,

i have a same problem with the DataGrid Blazor Component. I want the Grid height justify with flexbox but the Grid component is over the browser screen with 100%. If i set the height to for example 300px it´s fine but not sizeable.

Have you a solution for DataGrid with display:flex?



Vignesh Natarajan [Syncfusion]
Replied On January 3, 2020 01:22 PM UTC

Hi Devware,  

Greetings from Syncfusion support.  

Query: “Have you a solution for DataGrid with display:flex? 

We understand that you want to render the grid in the flexbox and want the Grid height to be adjusted within the box. If you want to the Grid to be adjusted inside the parent container, then we suggest you to define the height property of EjsGrid with 100% and also define specific height to parent container (flexbox). So that based on the flexbox height, Grid will be adjusted inside it.   

Refer the below code example.  

<div class="flex-container"> 
    <EjsGrid @ref="Grid" Height="100%" Width="100%" DataSource="@Orders" AllowPaging="true"> 
. . . . . . . . . . . ..  
    .flex-container { 
        display: flex; 
        height: 500px; 
        width: 700px;         

Refer our UG documentation for your reference 

Please get back to us with more details if you are facing any issues.  

Vignesh Natarajan.  


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

Live Chat Icon For mobile
Live Chat Icon