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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Datagrid vertical scroll is not possible when datagrid is inside stacklayout

Thread ID:





127616 Nov 28,2016 05:33 PM UTC Nov 29,2016 12:51 PM UTC WPF 1
Tags: SfDataGrid
Asked On November 28, 2016 05:33 PM UTC

when i have datagrid inside a stacklayout, vertical scroll is not working, not even appearing. Same code works if I move it outside stacklayout

   <StackPanel Orientation="Vertical" >
            <Label Content="DESCRIPTIONS" FontSize="20" Foreground="Black" />
            <syncfusion:SfDataGrid  x:Name="dataGrid"  ScrollViewer.CanContentScroll="True" ScrollViewer.VerticalScrollBarVisibility="Auto" EditTrigger="OnTap" AutoGenerateColumns="True" ItemsSource="{Binding RelativeSource={RelativeSource 
                                  FindAncestor, AncestorType={x:Type UserControl}}, Path=DataContext.Descriptions}"  AllowDeleting="False"
                             AllowEditing="False"     AllowFiltering="True"   AllowDraggingColumns="True" >

Jai Ganesh S [Syncfusion]
Replied On November 29, 2016 12:51 PM UTC

Hi Emil, 
We have analyzed your query. When we loading the datagrid inside a stacklayout, the vertical scroll is not showing. This is the default behavior of SfDataGrid. However, to overcome this by setting the Height for SfDataGrid like below, 
<syncfusion:SfDataGrid x:Name="datagrid"  
                                        ItemsSource="{Binding GDCSource}" 
Jai Ganesh S 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon