title: Add edit/delete button at the end of the table row
body: <p>I've inline create of row in table in my index view.when user click on add row button it pre-append new editable row to the table .</p>
  
  <p>at the end of the row there is button for save the data of the new row.when user click on save I disable the textboxes and checkboxes and </p>
  
  <p>remove the button of create, what I need is instead add to this row the button of edit and delete, which is default for all table rows, how should I do that?</p>
  
  <p>Here is the code for disable the row fields:</p>
  
  <pre><code>//Hide the create button
  $('#btnsubmit').remove();
  //Change the name property to disabled
  $('input').attr('readonly', true);
  $('#name').css("border", "none");
  </code></pre>
  
  <p>Here is the defult button for all the rows(if i press on create and refresh the page I will see the  button also in this new saved row but I want to </p>
  
  <p>add them when the row is added and the page was not refreshed...</p>
  
  <pre><code>   &lt;td&gt;
         @Html.ActionLink("Edit", "Edit", new { id = item.Id }) |
         @Html.ActionLink("Delete", "Delete", new { id = item.Id })
     &lt;/td&gt;
  </code></pre>
  
  <p>This is how I add the new row with the create button when user click on create new row</p>
  
  <pre><code>var html = '&lt;tr&gt;&lt;td&gt;@Html.TextBox("name")&lt;/td&gt;&lt;td&gt;@Html.CheckBox("checkBox1")&lt;/td&gt;&lt;td&gt;@Html.CheckBox("checkBox2")&lt;/td&gt;&lt;td&gt;@Html.CheckBox("checkBox3")&lt;/td&gt;&lt;td&gt;&lt;input id="btnsubmit" type="submit" value="Create" class="btn btn-default" /&gt;&lt;/td&gt;&lt;td&gt;&lt;/tr&gt;';
  
      function addRow() {
  
          if ($('#btnsubmit').length == 0) {
  
              //Append new row to the table
              jQuery(html).prependTo('#data-table');
  </code></pre>
  
  <p><strong>UPDATE</strong>
  this is the example of the table which for every row there is edit/delete button</p>
  
  <p><img src="https://i.stack.imgur.com/v23NP.png" alt="enter image description here"></p>
  
  <p><strong>UPDATE 2</strong></p>
  
  <p>I try to add the following but the button is not added when click on create</p>
  
  <pre><code> $('#btnsubmit').click(function () {
  
                  $.post("/Roles/Create", { name : $("name").val() }, function(NewID){
  
                      var oTD = $("#btnsubmit").parent();
                      oTD.append("&lt;a href='/Roles/Edit/"+ NewID +"'&gt;Edit&lt;/a&gt;");
  
                      oTD.append("&lt;a href='/Roles/Delete/"+ NewID +"'&gt;Delete&lt;/a&gt;");
  
  
                  });
  </code></pre>