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:

Created:

Updated:

Platform:

Replies:

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

HI,
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"
                       AllowResizingColumns="True"
                             AllowEditing="False"     AllowFiltering="True"   AllowDraggingColumns="True" >
            </syncfusion:SfDataGrid>
        </StackPanel>

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}" 
                                        AllowEditing="True" 
                                        Height="500" 
                                        SelectionMode="Multiple" 
                                        AutoGenerateColumns="True"                                            
                                        AllowGrouping="True"  
                                        ShowGroupDropArea="True"> 
 
 
Regards, 
Jai Ganesh S 


CONFIRMATION

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.

;