Disable scroll

Hi!

Is it possible to disable mouse wheel handling over the datagrid?

I placed 2 datagrids in the ScrollView. But the scrollview doesn't work when mouse pointer is over the datagrid.






3 Replies

GS Gokul S Subramani Syncfusion Team September 6, 2024 01:03 PM UTC

Hi Basil,


Based on the provided information, we are able to replicate the reported scenario. We are currently analyzing the cause for the reported scenario. We need more time to validate, and we will provide an update on or before September 10, 2024


Regards,

Gokul S



GS Gokul S Subramani Syncfusion Team September 10, 2024 12:29 PM UTC

Hi Basil,


We have checked the reported issue “Scrolling on ScrollViewer does not work properly when SfDataGrid is placed inside a ScrollViewer” on our end and it is confirmed as a defect. And We have logged a bug. We will fix this issue and include it in our NuGet release Which is scheduled on October 01, 2024.

You can track the status of this report through the following feedback link,

Feedback Link:  Scrolling on ScrollViewer does not work properly when SfDataGrid is placed inside a ScrollViewer in WinUI | Feedback Portal (syncfusion.com)

Note: The provided feedback link is private, and you need to log in to view this feedback. 

We will let you know once it is released. We appreciate your patience until then.
Disclaimer: Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.

Thank you for your understanding and cooperation.

Best Regards,
Gokul S



SG Santhosh Govindasamy Syncfusion Team September 30, 2024 04:13 PM UTC

Hi basil,

On further analysis we have founded that the reported issue can be resolved by setting “ ScrollViewer.IsVerticalScrollChainingEnabled” attached property of SfDataGrid as true
. The “IsVerticalScrollChainingEnabled” property of the ScrollViewer determines whether scroll chaining is enabled from this child to its parent along the vertical axis.


For more information, please refer the below code snippet,

<Grid Width="800" Height="450">

    <Grid.DataContext>

        <local:ViewModel/>

    </Grid.DataContext>

    <ScrollViewer>

        <StackPanel Spacing="30" >

            <dataGrid:SfDataGrid x:Name="sfDataGrid"

                                 GridLinesVisibility="Both"

                                 AutoGenerateColumns="False"

                                 ScrollViewer.IsVerticalScrollChainingEnabled="True"

                                 ItemsSource="{Binding Orders}">

                <dataGrid:SfDataGrid.Columns>

                    <dataGrid:GridNumericColumn MappingName="OrderID" HeaderText="Order ID" />

                    <dataGrid:GridTextColumn MappingName="CustomerName" HeaderText="Customer Name" />

                    <dataGrid:GridTextColumn MappingName="CustomerID" HeaderText="Customer ID" />

                    <dataGrid:GridTextColumn MappingName="ShipCity" HeaderText="Ship City" />

                    <dataGrid:GridTextColumn MappingName="Country" HeaderText="Country" />

                </dataGrid:SfDataGrid.Columns>

            </dataGrid:SfDataGrid>

            <dataGrid:SfDataGrid x:Name="sfDataGrid2"

                                 GridLinesVisibility="Both"

                                 AutoGenerateColumns="False"

                                ScrollViewer.IsVerticalScrollChainingEnabled="True"

                                 ItemsSource="{Binding DuplicateOrders}">

                <dataGrid:SfDataGrid.Columns>

                    <dataGrid:GridNumericColumn MappingName="OrderID" HeaderText="Order ID" />

                    <dataGrid:GridTextColumn MappingName="CustomerName" HeaderText="Customer Name" />

                    <dataGrid:GridTextColumn MappingName="CustomerID" HeaderText="Customer ID" />

                    <dataGrid:GridTextColumn MappingName="ShipCity" HeaderText="Ship City" />

                    <dataGrid:GridTextColumn MappingName="Country" HeaderText="Country" />

                </dataGrid:SfDataGrid.Columns>

            </dataGrid:SfDataGrid>

        </StackPanel>

    </ScrollViewer>

</Grid>


Please find the modified sample in the attachment. Please let us know if you have any concerns.


Best Regards,
Santhosh.G


Attachment: DataGridScrollViewer_33fc9ed7.zip

Loader.
Up arrow icon