Answers.Body: <p>It can be done, but only by saving the table field's data completely. There's no controller method to remove a table's row(s). Same would apply for a table within a Matrix block, or for a Matrix block itself. All content gets saved by calling the entries controller (saveEntry) with the new content in a POST.</p>
  
  <p>What you could do: Let your users create one or more matrix blocks, create your own plugin, create a controller with an <code>actionDeleteMatrixBlockById()</code> method (for instance) and let that controller call <code>craft()-&gt;matrix-&gt;deleteBlockById()</code> if one of the blocks has to be deleted.</p>
  
  <p>Bit of a hassle, though. Don't know your use-case, but seems a bit overkill.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-03-23T20:12:31.847Z
Answers.Text: Is this the same with Matrix rows??
Answers.UserDisplayName: Sam Hibberd
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-03-23T20:31:48.170Z
Answers.Text: See the edit, I added some Matrix info.
Answers.UserDisplayName: Paul
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-03-23T20:03:54.267Z
Answers.LastActivityDate: 2015-03-23T20:31:21.940Z
Answers.LastEditDate: 2015-03-23T20:31:21.940Z
Answers.UserDisplayName: Paul
Body: <p>I have a table field which is attached to users, before I go ahead and create the logic for adding rows on the front end via ajax, I need to know if I am going to be able to easily add the facility to delete specific rows (ideally without saving all the data again each time)?</p>
  
  <p>It may well be that depending on complexity that this is more suited to a matrix field or custom database tables via a plugin.</p>
  
  <p>Either way can it be done?</p>
  
Tags: <frontend><table-field>
Title: Can you delete rows from a table field on the front end?
ThreadText: # Can you delete rows from a table field on the front end?
  
  (Asked by: username_0 on 2015-03-23)
  
  I have a table field which is attached to users, before I go ahead and create the logic for adding rows on the front end via ajax, I need to know if I am going to be able to easily add the facility to delete specific rows (ideally without saving all the data again each time)?
  
  It may well be that depending on complexity that this is more suited to a matrix field or custom database tables via a plugin.
  
  Either way can it be done?
  
  **Tags:** frontend, table-field
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-03-23. Score: 2 | Accepted answer
  
  It can be done, but only by saving the table field's data completely. There's no controller method to remove a table's row(s). Same would apply for a table within a Matrix block, or for a Matrix block itself. All content gets saved by calling the entries controller (saveEntry) with the new content in a POST.
  
  What you could do: Let your users create one or more matrix blocks, create your own plugin, create a controller with an `actionDeleteMatrixBlockById()` method (for instance) and let that controller call `craft()->matrix->deleteBlockById()` if one of the blocks has to be deleted.
  
  Bit of a hassle, though. Don't know your use-case, but seems a bit overkill.
  
  > **Comments:**
  > **username_0**: Is this the same with Matrix rows??  
  > **username_1**: See the edit, I added some Matrix info.  
  
  ---
  
  