Serious Grid virtualization issues

Hi,

I am having a number of serious issues with grid virtualization (minimal repro code and image of problem provided):

  1. When I turn grid virtualization on and grid column virtualization on columns do not display correctly. i.e. some columns are not displayed, and the data does not line up with the headers (see image)  This does not happen when turned off.
  2. With virtualization on, I get 2 scrollbars (see image).  This does not happen when turned off.


grid-virt-issues.png


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>



3 Replies

RS Renjith Singh Rajendran Syncfusion Team November 1, 2021 12:24 PM UTC

Hi John, 
 
Greetings from Syncfusion support. 
 
We suggest you to ensure to set PageSize and RowHeight properties in Grid to overcome the reported problem. When rendering Grid component inside the SfDialog or any other layout component then it is suggested to ensure to set PageSize and RowHeight. Please refer and use as like the code below, 
 
 
<SfGrid ... DataSource=@data RowHeight="38"> 
       <GridPageSettings PageSize="30"></GridPageSettings> 
       ... 
</SfGrid> 

 
We have prepared a sample with your shared codes, please download the sample from the link below, 
 
We would like to inform your that, EnableColumnVirtualization feature is for loading large number of columns in an on-demand basis for improved performance. If there are less number of columns(say 3 columns) then it is not recommended to use EnableColumnVirtualization feature. So we suggest you to remove this property for cases when having less number of columns in Grid. 
 
Please get back to us if you need further assistance. 
 
Regards, 
Renjith R 



JO John November 5, 2021 06:53 PM UTC

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 :)



RS Renjith Singh Rajendran Syncfusion Team November 8, 2021 02:43 PM UTC

Hi John, 
 
Sorry for the inconvenience caused. 
 
Based on your scenario, you can overcome the multiple scroller display problem by just removing the EnableColumnVirtualization property. We have modified the sample based on your shared codes, please download the sample from the link below, 
 
As informed in our previous update, as there is no need for this property, you can remove this to overcome the reported problem. Please get back to us if you need further assistance. 
 
Regards, 
Renjith R 


Loader.
Up arrow icon