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
close icon

SfDataGrid not fully rendering when ItemSource collection contains 45000+ items

Hi,

I've come across a UI rendering issue with an SfDataGrid. When the ItemSource collection contains many items (45000+), not all the rows in the grid render on screen.

I've attached a sample app. If you run it and hit the "Generate" button, it will generate a SfDataGrid with 48000 rows.  If you then scroll to the towards the bottom of the grid, you will see that all rows up to and including row 46602 render correctly but then the subsequent rows are missing.  However, if you click the blank space where the missing rows should be, you will see that the missing rows are there and they are selectable (look at the right hand side of the app which shows what row has been selected). 

Is this a known issue or is it by design? If not, I'd be grateful if you could provide a fix for the issue. My app needs to be able to display 100,000+ rows.

Thanks in advance.

Regards,
Andrew

Attachment: SfDataGridPrismTest_d4f2deda.zip

5 Replies

MM Muthalagu M Syncfusion Team August 18, 2014 01:50 AM UTC

Hi Andrew,

Thanks for using Syncfusion Products.

We are able to reproduce the reported behaviour with our SfDataGrid and this is due to the limitation of ScrollViewer in Windows 8.1. Here the scroll viewer won’t generate the content after some extent. We are able to reproduce the above issue with following simple code and the same issue is not reproduced in Windows 8.

<ScrollViewer VerticalScrollBarVisibility="Visible" VerticalScrollMode="Auto"  Height="500">

            <Grid Background="Red" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Height="3000000" >
            </Grid>

</ScrollViewer>

Also we have posted the above issue in MSDN forum and please refer the following link.

Link: http://social.msdn.microsoft.com/Forums/en-US/6ee163dd-109e-461a-9bfc-f82dc7f6886c/scrollviewer-not-showing-the-bottom-part-of-the-content-rendering-issue?forum=winappswithcsharp

Please let us know if you have any concerns.

Regards,

Muthalagu



AR Andrew Ridout August 19, 2014 07:53 AM UTC

Hi Muthalagu,

Thanks for your reply.  I've read through the MSDN forum post and they suggested to enable virtualization on the ScrollViewer.  However, as you will see from the sample code in my original post, I have not nested the SfDataGrid in a ScrollViewer, rather it is just placed in a Grid.

Can you provide an example of how to enable virtualization on the SfDataGrid, if it even supports virtualization?  I have tried explicitly setting the height of the SfDataGrid and of the surrounding Grid control but neither of these have had any effect.

Thanks,
Andrew


MM Muthalagu M Syncfusion Team August 27, 2014 12:37 AM UTC

Hi Andrew,

 

In SfDataGrid, we have used the Microsoft Scrollviewer to show the content internally and the issue is reproduced with our control. By default, SfDataGrid comes with Virtualization support and no need to set it as explicitly. Also Microsoft accepted this as issue with Scrollviewer in Windows 8.1 and please refer the folllowing MSDN forum link.

 

MSDN Link: http://social.msdn.microsoft.com/Forums/en-US/428d4df4-efde-467f-aa67-c6886c70ea69/bugscrollviewer-can-not-show-content-win81-vs2013?forum=winappswithcsharp 

 

Please let us know if you have any concerns.

 

Regards,

Muthalagu



AR Andrew Ridout August 27, 2014 10:38 AM UTC

Hi Muthalagu,

I understand that the problem is with ScrollViewer and not SfDataGrid.  However, the workaround suggestion in this MSDN forum post was to enable virtualization on the ScrollViewer so the visible area will never reach the max height limit.

You're saying the SfDataGrid has virtualization support enabled by default. Is this also the case for the internal ScrollViewer within the SfDataGrid or does it need to be explicitly enabled?  Or are you saying that Microsoft's suggested workaround will not work with SfDataGrid?

Thanks,
Andrew



MM Muthalagu M Syncfusion Team September 3, 2014 03:03 AM UTC

Hi Andrew,

 

Normally we cannot use the Virtualization directly to scrollviewer and it can be applied to panel which is placed inside the scrollviewer. Here the Virtualization works with Panel and consider only the viewport height and width. When the ScrollViewer reaches the certain limit in Windows 8.1, it clips the panel content. Like this our SfDataGrid comes with Virtualization Feature as, having the panel inside the ScrollViewer named as VisualContainer and consider the ViewPort height. Hence our SfDataGrid comes with the solution suggested by MSDN but it not works.

 

Please let us know if you have any concerns.

 

Regards,

Muthalagu


Loader.
Live Chat Icon For mobile
Up arrow icon