title: How to add picturebox controls to datagridview in c#
body: <pre><code>private void InitializeComponent()
  {
      dataGrid = new DataGridView();
      dataGrid.DataSource = this._lstWorklet;
      dataGrid.DataBindingComplete += new System.Windows.Forms.DataGridViewBindingCompleteEventHandler(dataGrid_DataBindingComplete);
  }
  
  private void dataGrid_DataBindingComplete(object sender, DataGridViewBindingCompleteEventArgs e)
  {
      PictureBox _btnView = new PictureBox();
      _btnView.Size = new System.Drawing.Size(24, 24);
      _btnView.BackgroundImage = ProcessingDataModel._viewImg;
      _btnView.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
      _btnView.Cursor = System.Windows.Forms.Cursors.Hand;
      _btnView.Click += new System.EventHandler(this.btnViewRecording_click);
      System.Windows.Forms.ToolTip _toolTipView = new System.Windows.Forms.ToolTip();
      _toolTipView.SetToolTip(_btnView, &quot;View Recording&quot;);
  
  
      PictureBox _btnDelete = new PictureBox();
      _btnDelete.Size = new System.Drawing.Size(24, 24);
      _btnDelete.BackgroundImage = ProcessingDataModel._deleteImg;
      _btnDelete.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
      _btnDelete.Cursor = System.Windows.Forms.Cursors.Hand;
      _btnDelete.Click += new System.EventHandler(this.btnDeleteRecording_click);
      System.Windows.Forms.ToolTip _toolTipDelete = new System.Windows.Forms.ToolTip();
      _toolTipDelete.SetToolTip(_btnDelete, &quot;Delete Recording&quot;);
  
      dataGrid.Columns[3].Name = &quot;Action&quot;;
      dataGrid.Columns[3].HeaderText = &quot;Action&quot;;
      dataGrid.Columns[3].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
  
      for (int i = 0; i &lt;= dataGrid.Rows.Count; i++)
      {
         dataGrid.Rows[i].Cells[3].Controls.Add(_btnView);
         dataGrid.Rows[i].Cells[3].Controls.Add(_btnDelete);
      }
  }
  </code></pre>
  <p>I am getting error in for loop on (dataGrid.Rows[i].Cells[3].Controls.Add(_btnView)) like <strong>'DataGridViewCell' does not contain a definition for 'Controls' and no accessible extension method 'Controls' accepting a first argument of type 'DataGridViewCell' could be found (are you missing a using directive or an assembly reference?)</strong>
  So please help me about adding the Picturebox to the column in datagridview for windows application.</p>
  <p><a href="https://i.stack.imgur.com/k0hBQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/k0hBQ.png" alt="enter image description here" /></a></p>