The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
We've been trying to see if it's possible to have an event or any way to have the scrollviewer disabled when there are not enough items for a scroll and have it enabled once there are. This would avoid a small issue which is that when the datagrid doesn't have enough items it shouldn't catch the scroll event and avoid scrolling on the parent element.
I've created a little sample having a scrollviewer and a list of textblock which exceed the screen on vertical for the scrollviewer to be enabled. If there are a few items in the datagrid and there's no scroll it just catched and disables the parent's scrollviewer, is there any solution to this? One solution would be by adding the properties ScrollViewer.HorizontalScrollMode="Disabled" and ScrollViewer.VerticalScrollMode="Disabled" but that would mean that if there are a lot of items the scroll on the datagrid won't work at all.
GTGnanasownthari Thirugnanam Syncfusion Team August 17, 2017 02:56 PM UTC
Hi Alexandru,
We have analyzed your query “Few items in SfDataGrid while scroll over the SfDataGrid, ScrollViewer does not scrolled”, Scroll over the SfDataGrid while loaded inside the ScrollViewer manipulation handled by itself(SfDataGrid), so ScrollViewer does not scrolled but you can achieve your requirement by disable the ScrollViewer based on ExtentHeight and ExtentWidth of VisualContainer as like below cod example.
GTGnanasownthari Thirugnanam Syncfusion Team August 19, 2017 11:56 AM UTC
Hi Alexandru,
You can also achieve your requirement “Few items in SfDataGrid while scroll over the SfDataGrid, ScrollViewer does not scrolled” in another way using IsVerticalRailEnabled and IsVerticalScrollChainingEnabled attached properties as true like below code example.
IsVerticalChainingEnabled attached property decides whether the scroll chaining is enabled from Child to its parent.