<SfGrid DataSource="@Orders" AllowPaging="true" Width="700">
<GridColumns>
<GridColumn Field=@nameof(Order.OrderID) HeaderText="Order ID" TextAlign="TextAlign.Right" Width="120"></GridColumn>
<GridColumn Field=@nameof(Order.CustomerID) HeaderText="Customer Name" Width="150"></GridColumn>
. . . . . .
</GridColumns>
</SfGrid>
|
|
<div style="width: calc(100vw - 20rem); height: calc(100vw - 58rem);">
//Change the 20rem and 59rem values based on your browser page layout
<SfGrid DataSource="@Orders" Height="100%" Width="100%">
..
..
</SfGrid>
</div> |
<div style="width: calc(100vw - 1rem); height: calc(100vh - 2rem);">
//Change the vw, vh and rem values based on your browser page layout
<SfGrid DataSource="@Orders" Height="100%" Width="100%">
...
</SfGrid>
</div>
|
Has anything changed regarding SfGrid grid content sizing? I also had a lot of difficulty wrangling it into the container size. The e-gridcontent size + e-gridheader size exceeds the SfGrid element's size, and then makes layout really frustrating.
Version:
"Syncfusion.Blazor" Version="18.4.0.35"
I am using the suggested 'hack' but feel this should be handled correctly by syncfusion. Am I missing something?
Hi Alek,
Greetings from Syncfusion.
We suspect that you are facing styling issues(grid content size not set properly while setting Grid height using the previously provided solution) in the latest version(v20.1.0.47). We are facing the below case from our end while upgrading to the latest version.
In version – 18.4.0.35
|
In the latest – v20.1.0.47
|
If this is the issue(the grid content height is not properly set and the pager is rendered along with grid content) you are currently facing in the latest version, then you can resolve the reported case by adding the below line in _Host.cshtml/_Layout.cshtml /index.html file.
<head> . . . <link rel='nofollow' href="_content/Syncfusion.Blazor/styles/material.css" rel="stylesheet" /> <script src=https://cdn.syncfusion.com/blazor/20.1.47/syncfusion-blazor.min.js type="text/javascript"></script> </head> |
We would like to inform you that we have included changes in loading scripts and styles in our latest version.
Release notes:
https://blazor.syncfusion.com/documentation/release-notes/20.1.47?type=all#breaking-changes
You can use any one of the below methods to load styles and scripts externally. Also kindly refer to the below ways for your additional information.
If it is not your reported case, then share more details about your problem(screenshot, video).
Please let us know if you have any concerns.
Regards,
Rahul