title: Is there a way to implement DataGridView SaveItem button without using TableAdapters?
body: <p>I'm currently trying to implement DataGridView SaveItem operation...</p>
  
  <p>Since I already have CRUD methods written and I didn't use TableAdapters I'm wondering if there is a smart way of implementing Save without using adapter.</p>
  
  <p>My current take was implementing on CellEditEnd ike this:</p>
  
  <pre><code>private void djelatnikDataGrid_CellEndEdit(object sender, DataGridViewCellEventArgs e)
          {
              DataGridViewRow gridrow = djelatnikDataGrid.Rows[e.RowIndex];
              DataRowView rowview = (DataRowView)gridrow.DataBoundItem;
              DataRow row = rowview.Row;
              if (row.RowState != DataRowState.Unchanged || djelatnikDataGrid.IsCurrentRowDirty)
              {
                  if (djelatnikDataGrid.Rows.Count == (e.RowIndex+1))
                  {
                      djelatnik_ListaNovihRedaka.Add(row);
                  }
  
                  djelatnik_ListaRedakaSaPromjenama.Add(row);
              }
          }
  </code></pre>
  
  <p>I want to check if the record is a new row or existing one that was edited, then I add it to NewRowList or UpdatedRowList based on RowIndex and on SaveItemClick I go foreach row and call Insert/Update methods like this:</p>
  
  <pre><code>private void btnSaveDjelatnik_Click(object sender, EventArgs e)
          {
              if (DataDirty)
              {
                  foreach (DataRow row in djelatnik_ListaNovihRedaka)
                  {
                      Djelatnik djelatnik = new Djelatnik();
                      djelatnik.ImePrezime = row["ImePrezime"].ToString();
                      djelatnik.Zvanje = row["Zvanje"].ToString();
                      djelatnik.RadnoMijesto = row["RadnoMjesto"].ToString();
                      r.InsertDjelatnik(djelatnik);
                  }
  
              if (vozilo_ListaRedakaSaPromjenama.Count &gt; 0)
              {
                  foreach (DataRow row in djelatnik_ListaRedakaSaPromjenama)
                  {
                      Djelatnik djelatnik = new Djelatnik();
                      djelatnik.ImePrezime = row["ImePrezime"].ToString();
                      djelatnik.Zvanje = row["Zvanje"].ToString();
                      djelatnik.RadnoMijesto = row["RadnoMjesto"].ToString();
                      r.UpdateDjelatnik(djelatnik);
                  }
              }
              MessageBox.Show("Promijene su spremljene u bazu podataka!");
          }
      }
  </code></pre>
  
  <p>I know it's kind of ambiguous question but If somebody could point me to a direction I'd appreciate it</p>