title: WPF Datagrid View (After Inserting Data into Cells explicitly when content scrolled Data loosing )
body: <p>After Inserting Data into WPF datagrid cell Explicitly When content is scrolled the data loosing from the Cells</p>
  
  <p>Data which I inserted disappears from cells</p>
  
  <pre><code>     &lt;DataGrid AllowDrop="True" 
                    AlternatingRowBackground="White" AutoGenerateColumns="True"
                    Background="#FFDBF7FC" BorderBrush="#FF2374A0" 
                    BorderThickness="2" CanUserReorderColumns="True"
                    HorizontalGridLinesBrush="#FF041D31" 
                    Margin="17,173,0,-414" x:Name="DashBoardGrid" 
                    RowBackground="#FFDBF7FC" 
                    ScrollViewer.CanContentScroll="False" 
                    ScrollViewer.HorizontalScrollBarVisibility="Auto"
                    ScrollViewer.VerticalScrollBarVisibility="Disabled" 
                    VerticalGridLinesBrush="#FF041D31" 
                    SelectedIndex="0" HorizontalAlignment="Left" 
                    Width="929" /&gt;
  
  
  
  int columnno = Convert.ToInt32(ColumnNo.Text); 
          int Finalcolumn = columnno - 1; 
          int count = DashBoardGrid.Items.Count;
  
          for (int i = 0; i &lt; count - 1; i++)
          {
              DataGridHelper.GetCell(DashBoardGrid, i, Finalcolumn).Content = AutofillValue.Text;
          }
  </code></pre>