title: Kendo Grid update jquery
body: <p>I have a kendo grid with dynamic buttons, so after update I need to reload the grid to show/hide buttons, but it's not working :(</p>
  
  <p>Here's my grid:</p>
  
  <pre><code>$("#grid").kendoGrid({        
      dataSource: {
  
          transport: {
              read: {
                  url: "/CentroCusto/Lista",
                  dataType: "json",
                  cache: false
              },                
              update: {
                  url: "/CentroCusto/Salvar",
                  contentType: "application/json",
                  dataType: "json",
                  cache: false,
                  complete: function (data) {
  
                      if (data.status == 500) {
                          alert('Ocorreu um erro ao salvar o registro.');
                      }
                      else {
                          $("#grid").data("kendoGrid").dataSource.read();
                      }
                  }
              },
              parameterMap: function (options, operation) {
  
                  if (operation == "update") {
  
                      return { models: kendo.stringify(options) };
                  }
  
              }
          },
          schema: {
              model: {
                  id: "Id",
                  fields: {
                      Id: { type: "number" },
                      Codigo: { type: "string", editable: false },
                      Descricao: { type: "string", editable: false },
                      Empresa: { type: "string", editable: false },
                      AprovadorId: { type: "number", editable: false },
                      NomeAprovador01: { type: "string", editable: true, validation: { required: true } },
                      PercentualLimite: { type: "number", editable: true, validation: { required: true, max: 100 } },
                      Status: { type: "string", editable: false },
                      AprovadorN01: { defaultValue: 1, field: "AprovadorN01" },
                      AprovadorN02: { defaultValue: 1, field: "AprovadorN02" },
                      AprovadorN03: { defaultValue: 1, field: "AprovadorN03" },
                      AprovadorN04: { defaultValue: 1, field: "AprovadorN04" },
                      NomeAprovador02: { type: "string", editable: false },
                      Aprovador03: { type: "number", editable: true, validation: { required: false } },
                      NomeAprovador03: { type: "string", editable: true, validation: { required: true } },
                      Aprovador04: { type: "number", editable: true, validation: { required: false } },
                      NomeAprovador04: { type: "string", editable: true, validation: { required: true } }
                  }
              }
          },
          pageSize: 20,
          serverPaging: false,
          serverFiltering: false,
          serverSorting: false
      },        
      height: 450,
      selectable: true,
      filterable: true,
      sortable: true,
      pageable: true,
      dataBound: gridDataBound,
      columns: [{ field: "Codigo", title: "Código" },
                { field: "Descricao", title: "Descrição" },
                { field: "Empresa", title: "Empresa" },
                { field: "AprovadorN01", title: "Aprovador N01", editor: aprovadorDropDown, template: "#=AprovadorN01.Nome#" },
                { field: "AprovadorN02", title: "Aprovador N02", editor: aprovador02DropDown, template: "#=AprovadorN02.Nome#" },
                { field: "AprovadorN03", title: "Aprovador N03", editor: aprovador03DropDown, template: "#=AprovadorN03.Nome#" },
                { field: "AprovadorN04", title: "Aprovador N04", editor: aprovador04DropDown, template: "#=AprovadorN04.Nome#" },
                { field: "PercentualLimite", title: "% Limite", width: "10%", format: "{0:n}" },
                { field: "Status", title: "Status", width: "10%" },
                {
                    command: [
                      {
                          name: "edit",
                          text: { edit: "Ativar", update: "Salvar", cancel: "Cancelar" },
                          className: "btn-successo",
                          imageClass: 'glyphicon glyphicon-remove-circle'
                      },
  
                      {
                          name: "inativar",
                          text: "Inativar",
                          className: "btn-excluir",
                          click: Inativar,
                          imageClass: 'glyphicon glyphicon-remove-circle'
                      },
  
                      {
                          name: "edit",
                          text: { edit: "Alterar", update: "Salvar", cancel: "Cancelar" },
                          className: "btn-alterar"
                      }
                    ]
                    , width: "180px"
                }
  
  
      ],
          editable: {
              update: true,
              mode: "popup"
          },
          cancel: function (e) {
              $("#grid").data("kendoGrid").dataSource.read();
          },
          edit: function (e) {
              e.container.kendoWindow("title", "Alterar Centro de Custo");
          }    
      });
  
      function gridDataBound() {
      $("#grid tbody tr .btn-successo").each(function () {
          var currentDataItem = $("#grid").data("kendoGrid").dataItem($(this).closest("tr"));
  
          //Check in the current dataItem if the row is editable
          if (currentDataItem.Status == "Ativo") {
              $(this).remove();
          }
      })
  
      $("#grid tbody tr .btn-excluir").each(function () {
          var currentDataItem = $("#grid").data("kendoGrid").dataItem($(this).closest("tr"));
  
          //Check in the current dataItem if the row is editable
          if (currentDataItem.Status == "Inativo") {
              $(this).remove();
          }
      })
  
      $("#grid tbody tr .btn-alterar").each(function () {
          var currentDataItem = $("#grid").data("kendoGrid").dataItem($(this).closest("tr"));
  
          //Check in the current dataItem if the row is editable
          if (currentDataItem.Status == "Inativo") {
              $(this).remove();
          }
      })
  
      if ($('#canEdit').val().toUpperCase() == "FALSE") {
          $('#grid').find(".btn-alterar").hide();
          $('#grid').find(".btn-successo").hide();
          $('#grid').find(".btn-excluir").hide();
      }
  }
  </code></pre>
  
  <p>What happens is that when I get an error, the error message inside complete on update event is shown, but when the update succeed the instruction <code>$("#grid").data("kendoGrid").dataSource.read()</code> is not being called.
  I would like to know if there's another way to do that, like save using $.ajax or if there's another event to call after "Update Success".</p>
  
  <p><strong>-----------------------------------------------------------------</strong></p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I changed the 'data' to 'e' in the complete method under update and it's working now.</p>