title: How to make DataGrid scrollable?
body: <p>Good day!
  I have datagrid ,buttons Add\Remove and i want to make vertical scroll rows, when the number of lines increases.</p>
  
  <p>I try this on DataGrid:</p>
  
  <pre><code>VerticalScrollBarVisibility="Visible"
  </code></pre>
  
  <p>But scroll is inactive. 
  Full code:</p>
  
  <pre><code>&lt;Grid Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="4"&gt;
          &lt;Grid.RowDefinitions&gt;
              &lt;RowDefinition&gt;&lt;/RowDefinition&gt;         
          &lt;/Grid.RowDefinitions&gt;
  
          &lt;Grid.ColumnDefinitions&gt;
              &lt;ColumnDefinition&gt;&lt;/ColumnDefinition&gt;
              &lt;ColumnDefinition&gt;&lt;/ColumnDefinition&gt;
              &lt;ColumnDefinition&gt;&lt;/ColumnDefinition&gt;
              &lt;ColumnDefinition&gt;&lt;/ColumnDefinition&gt;
          &lt;/Grid.ColumnDefinitions&gt;
  
      &lt;GroupBox Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="4"&gt;
          &lt;GroupBox.Header&gt;
              &lt;TextBlock Text="Tables'}"
             FontWeight="Bold"
             FontStyle="Italic" /&gt;
          &lt;/GroupBox.Header&gt;
              &lt;TabControl Grid.Row="0" Grid.RowSpan="4"&gt;
                  &lt;TabItem  Header="Table 1" &gt;
                      &lt;StackPanel Orientation="Vertical" Grid.Column="0" Grid.Row="0"&gt;
                          &lt;ToolBar   Height="22"&gt;
  
                              &lt;Button x:Name="btAdd"  Click="btAdd_Click"  Height="22"
                      ToolTip="Add"&gt;                                              
                              &lt;/Button&gt;
  
                              &lt;Button x:Name="btDel"  Click="btDel_Click"  Height="22"
                      ToolTip="Delete"&gt;                               
                              &lt;/Button&gt;
                          &lt;/ToolBar&gt;
  
                          &lt;DataGrid AutoGenerateColumns="False" 
                              Name="dgTable"     
                              VerticalScrollBarVisibility="Visible"
                              CanUserAddRows="False"
                              CanUserDeleteRows="False"
                              IsEnabled="True"
                              IsReadOnly="False"
                              ItemsSource="{Binding ObjectViewModel.RowColl,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"&gt;
  
                              &lt;DataGrid.Columns&gt;
                                  ....
                              &lt;/DataGrid.Columns&gt;
                          &lt;/DataGrid&gt;                    
                      &lt;/StackPanel&gt;                  
                  &lt;/TabItem&gt;
              &lt;/TabControl&gt;
          &lt;/GroupBox&gt;
      &lt;/Grid&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p>But when i add too much rows at datagrid- nothing happens- i can not scroll rows.
  Please, tell me how to make datagrid scrollable.</p>
  
  <p>Thank you!</p>