@{
    ViewData["Title"] = "About";
}

<section class="jumbotron text-center">
    <div class="container">
        <h1 class="jumbotron-heading">@ViewBag.Title.</h1>
        <p class="lead-text text-muted">@ViewBag.Message</p>
    </div>
</section>

<p>Use this area to provide additional information.</p>
<script>
    var data;
    function onEdit(e) {
        var dataItem = e.model;
    }
    function onSave(e) {
        e.model.set("ShipCity", data);
    }
    $("#sendData").on("click", sendData);
    function sendData(e) {
        var grid = $("#grid").data("kendoGrid");

        // Get the dataSource of the Grid
        var dataSource = grid.dataSource;

        // Parse the data of the dataSource to JSON format

        var rows = { 'rows': dataSource.data().toJSON() };

        // Building and executing the Ajax request
        $.ajax({
            url: "@Url.Action("GetGridInfo","Grid")",
            data: rows,
            dataType: "json",
            type: "POST"
        });
    }
</script>