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.
Unfortunately, activation email could not send to your email. Please try again.

Datagrid vertical scroll is not possible when datagrid is inside stacklayout

Thread ID:





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

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 07:51 AM

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.

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.