title: Argument 1: cannot convert from 'Infragistics.WebUI.UltraWebGrid.UltraGridRow' to 'Infragistics.Web.UI.GridControls.ControlDataRecord'
body: <p>I am converting a bunch of code from vb.net to c# and I don't know vb.net very well so I am running into a lot of issues. </p>
  
  <p>Can someone help me see what is wrong here?</p>
  
  <pre><code>protected void GenerateSalaryPunchesTable()
          {
              this.dgvPunchs.Rows.Clear();
  
              string[] DateRange = this.cboPayPeriods.SelectedItem.Text.ToString().Replace(" ", "").Split('-');
  
              while (Convert.ToDateTime(DateRange[0]) &lt;= Convert.ToDateTime(DateRange[1]))
              {
                  if (Convert.ToDateTime(DateRange[0]).DayOfWeek != DayOfWeek.Saturday &amp; Convert.ToDateTime(DateRange[0]).DayOfWeek != DayOfWeek.Sunday)
                  {
                      Infragistics.WebUI.UltraWebGrid.UltraGridRow nRow = new Infragistics.WebUI.UltraWebGrid.UltraGridRow();
  
                      nRow.Cells.Add();
                      // Date Cell
                      nRow.Cells.Add();
                      // Worked CB
                      nRow.Cells.Add();
                      // Vacation CB
                      nRow.Cells.Add();
                      // Sick CB
                      nRow.Cells.Add();
                      // Holiday CB
                      nRow.Cells.Add();
                      // Error
  
                      nRow.Key = Convert.ToDateTime(DateRange[0].ToString()).ToShortDateString();
                      nRow.Cells[0].Value = Convert.ToDateTime(DateRange[0].ToString()).ToShortDateString();
                      nRow.Cells[1].Value = 0;
                      nRow.Cells[2].Value = 0;
                      nRow.Cells[3].Value = 0;
                      nRow.Cells[4].Value = 0;
                      nRow.Cells[5].Value = "";
  
                      this.dgvPunchs.Rows.Add(nRow);
                  }
  
                  DateRange[0] = Convert.ToDateTime(DateRange[0]).AddDays(1);
              }
  
          }
  </code></pre>
  
  <p>Here is the error it is giving me:</p>
  
  <p>Error   4   The best overloaded method match for 'Infragistics.Web.UI.GridControls.ControlDataRecordCollection.Add(Infragistics.Web.UI.GridControls.ControlDataRecord)' has some invalid arguments<br>
  Error   5   Argument 1: cannot convert from 'Infragistics.WebUI.UltraWebGrid.UltraGridRow' to 'Infragistics.Web.UI.GridControls.ControlDataRecord'  </p>
  
  <p>And here is the control:</p>
  
  <pre><code>&lt;ig:WebDataGrid ID="dgvPunchs" runat="server" Height="350px" Width="400px"&gt;
                          &lt;/ig:WebDataGrid&gt;
  </code></pre>
  
  <p>It was converted from VB.net and an older version of Infragistics.  I cannot figure this out so far.</p>
  
  <p>EDIT:</p>
  
  <p>I tried this and it didn't work either...</p>
  
  <pre><code>Infragistics.Web.UI.GridControls.ControlDataRecord nRow =
    Infragistics.Web.UI.GridControls.ControlDataRecord();
  //Infragistics.WebUI.UltraWebGrid.UltraGridRow nRow = new Infragistics.WebUI.UltraWebGrid.UltraGridRow();
  </code></pre>