title: Winform Scrollbar don't show up on script initialized Datagridview
body: <p>I have a problem with my script initialized DataGridView. I tried a lot of solution prior to post this question and made a lot of research.</p>
  <p>Here is the problem, when I use the method above, I can't see the scrollbar.</p>
  <pre><code>
  public void AddNewPanTab(TabControl tab, ComboBox panIndex)
          {
              
  
              tab.TabPages.Add(&quot;Panneau &quot; + tab.TabCount);
  
  
              DataGridViewDragNDrop dragNDrop = new DataGridViewDragNDrop();
              DataGridView panGridView = new DataGridView();
              panGridView.Name = &quot;panGridView_&quot; + tab.TabCount;
              
              panGridView.RowTemplate.Height = 24;
              panGridView.Size = new System.Drawing.Size(1375, 458);
              panGridView.Columns.Add(&quot;id&quot;, &quot;id&quot;);
              panGridView.Columns.Add(&quot;part_code&quot;, &quot;part_code&quot;);
              panGridView.Columns.Add(&quot;description&quot;, &quot;description&quot;);
              panGridView.Columns.Add(&quot;size&quot;, &quot;size&quot;);
              panGridView.Columns.Add(&quot;manufacturier&quot;, &quot;manufacturier&quot;);
              panGridView.Columns.Add(&quot;distributeur&quot;, &quot;distributeur&quot;);
              panGridView.Columns.Add(&quot;prix&quot;, &quot;prix&quot;);
              panGridView.Columns.Add(&quot;revise&quot;, &quot;revise&quot;);
              panGridView.Columns.Add(&quot;date_revision&quot;, &quot;date_revision&quot;);
              panGridView.Columns.Add(&quot;Quantité&quot;, &quot;Quantité&quot;);
              panGridView.Columns[0].Width = 100;
              panGridView.Columns[1].Width = 150;
              panGridView.Columns[2].Width = 250;
              panGridView.Columns[3].Width = 100;
              panGridView.Columns[4].Width = 100;
              panGridView.Columns[9].Width = 75;
              dragNDrop.view = panGridView;
              
              panIndex.Items.Add(tab.TabCount - 1);
              panGridView.CellMouseDown += dragNDrop.DataGridView_CellMouseDown;
              panGridView.MouseMove += dragNDrop.dataGridView_MouseMove;
              panGridView.MouseUp += dragNDrop.dataGridView_MouseUp;
              
  
  
              
              tab.TabPages[tab.TabCount - 1].Controls.Add(panGridView);
              
  
  
          }
  
  </code></pre>
  <p>I tried</p>
  <pre><code>panGridView.ScrollBars = System.Windows.Forms.ScrollBars.Both;
  </code></pre>
  <p>without any result. I have access to the data grid because I populate it and drag and drop rows and do A lot of thing with data into the DataGridView.</p>
  <p>I checked that the DWG is smaller than his parent tabs.</p>
  <p>I just can't figure what is happening. If I add a dwg from the toolbox, I can show or hide the scrollbar from his properties and I supposed it's the same for script dwg.</p>
  <p>Maybe the problem comes from the parent relation but I don't know.</p>
  <p>here is a picture of the situation</p>
  <p><a href="https://i.stack.imgur.com/eXlcY.png" rel="nofollow noreferrer">the image below is my application</a></p>