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

Grid 100% Height does not fill parent div.

Hello,

On latest version (17.2.34), I create a grid with height 100%, it does not fill the entire parent div :

<div style="width: 100%; height: 100%>
    <EjsGrid id="Grid" Width="100%" Height="100%">
        <GridColumns>
            <GridColumn HeaderText="Order ID" TextAlign="TextAlign.Right" Width="120"></GridColumn>
            <GridColumn HeaderText="Customer Name" Width="150"></GridColumn>
            <GridColumn HeaderText="Order Date" Format="yMd" Type="date" Width="130"></GridColumn>
            <GridColumn HeaderText="Freight" Format="C2" Width="120"></GridColumn>
            <GridColumn HeaderText="Ship Country" Width="150"></GridColumn>
        </GridColumns>
    </EjsGrid>
</div>

The behavior changes came that now the generated DOM is :

<div class>
     <div id="Grid" class="e-control e-grid ....

The "<div class" is new in the rendering and breaks the meaning of size for grid, I see the same issue for EjsTabItems.


Regards,

Brice


3 Replies

RN Rahul Narayanasamy Syncfusion Team July 18, 2019 11:03 AM UTC

Hi Brice, 
 
Greetings from Syncfusion. 
 
Query: On latest version (17.2.34), I create a grid with height 100%, it does not fill the entire parent div : The "<div class" is new in the rendering and breaks the meaning of size for grid,  
 
We have validated your query and after upgrading to latest NuGet version(17.2.0.34) a new div is added before the grid component because we have added placeholder property to our source. You can resolve the reported problem by using following way. 
 
[code example] 
... 
@{  
    Syncfusion.EJ2.Blazor.EjsBase.EnablePlaceholder(false);   //set EnablePlaceholder to property as false to avoid this problem in entire application. 
} 
 
    <div style="width: 100%; height: 100%"> 
        <EjsGrid DataSource="@gridData" Width="100%" Height="100%" Toolbar="@(new List<string>() { "Add", "Edit", "Delete", "Cancel", "Update" })"> 
            <GridEditSettings AllowAdding="true" AllowEditing="true" AllowDeleting="true" Mode="@EditMode.Normal"></GridEditSettings> 
            <GridColumns> 
                ... 
       </EjsGrid> 
    </div> 
 
@functions{ 
    public List<OrdersDetails> 
    gridData { get; set; } 
    protected override void OnInit() 
    { 
    gridData = OrdersDetails.GetAllRecords(); 
    } 
    } 
 
 
 
Please get back to us if you need further assistance. 
 
Regards, 
Rahul 



BF Brice FROMENTIN July 18, 2019 12:53 PM UTC

Thank you, It works perfectly.

Maybe, it should be interesting to open an issue or change request to specify to the placeholder the size of the inner component.

Regards,

Brice


VN Vignesh Natarajan Syncfusion Team July 19, 2019 07:28 AM UTC

Hi Brice,  

Query: “it should be interesting to open an issue or change request to specify to the placeholder the size of the inner component. 

Thank you for your suggestion and for taking the time to report this issue "Grid is not responsive after upgrading to latest Nuget". At Syncfusion, we are committed to fixing all validated defects (subject to technological feasibility and Product Development Life Cycle ) and including the defect fix in our subsequent Nuget patch release which is expected to be roll on or before 24th July 2019.  
 
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link. 
 
 
Till then we appreciate your patience. 

Regards, 
Vignesh Natarajan. 


Loader.
Live Chat Icon For mobile
Up arrow icon