I'm using the following ajax request to refresh the grid, but I always get an empty grid. I'm not able to find what I'm doing wrong.
I'm trying to achieve a way to remove a row from the table after I trigger the NextState method for that row. Is there a better way to do that then refreshing the grid's data source?
Thanks in advance.
$(document).ready(function () { $(document).on("click", ".ceva", getNextState); }); function getNextState(e) { var grid = $("#Grid").data("kendoGrid"); var ID = $(e.currentTarget).attr('id'); var orderID = $(e.currentTarget).attr('data-ID'); var urlCon = "Idea/NextState?state=" + ID + "&iD=" + orderID; $.ajax({ type: "POST", url: urlCon, contentType: "application/json; charset=utf-8", success: function (data) { var x = data; grid.dataSource.data(data); grid.refresh(); }, error: function () { alert("something went wrong"); } });I'm trying to achieve a way to remove a row from the table after I trigger the NextState method for that row. Is there a better way to do that then refreshing the grid's data source?
Thanks in advance.