Hi,
I am having a number of serious issues with grid virtualization (minimal repro code and image of problem provided):
Repro code:
@page "/"
@using Syncfusion.Blazor.Popups
@using System.Dynamic
@using Syncfusion.Blazor.Grids
<style>
.flex-1 {
flex: 1;
}
.flex-1-overflow {
flex: 1;
overflow: auto;
}
</style>
@{
var data = new List<ExpandoObject>();
for (var i = 0; i < 100; i++)
{
dynamic item = new ExpandoObject();
item.Index = i;
item.Name = "Hello";
item.Value = 3.14 * i;
data.Add(item);
}
}
<SfDialog Width="500px" Height="400px" IsModal="true">
<DialogTemplates>
<Header>Grid</Header>
<Content>
<div class="d-flex flex-column h-100">
<div>Some text</div>
<div class="flex-1-overflow">
<SfGrid
Height="100%"
Width="100%"
EnableVirtualization="true"
EnableColumnVirtualization="true"
TValue="ExpandoObject"
DataSource=@data>
<GridColumns>
<GridColumn Field="Index" Width="75" />
<GridColumn Field="Name" Width="75" />
<GridColumn Field="Value" Width="75" />
</GridColumns>
</SfGrid>
</div>
</div>
</Content>
</DialogTemplates>
<DialogButtons>
<DialogButton Content = "Close" IsPrimary = "false" />
</DialogButtons>
</SfDialog>
<SfGrid ... DataSource=@data RowHeight="38">
<GridPageSettings PageSize="30"></GridPageSettings>
...
</SfGrid>
|
Thank you for the reply. The workaround you provided does indeed work.
However, we feel that adding this pair of settings is far from obvious and warrants a bug fix, not just a workaround.
Thanks :)