首页 > 解决方案 > jsGrid - 单击提交按钮时获取新数据

问题描述

我如何在使用jsGrid编辑行后获取数据行我的问题:当我点击提交时显示错误消息功能不存在

<div id="jsGrid"></div>
<input type="button" onclick="funGetNewData();" value="Save" class="btn btn-twitter" />
<script>
    var dataList;
    $.getJSON("http://localhost:50613/Admin/Offers/json_Getdata").done(function (data) {
        dataList = data;
        $("#jsGrid").jsGrid({
            width: "100%",

            filtering: true,
            autoload: true,
            inserting: true,
            editing: true,
            sorting: true,
            paging: true,
            pageSize: 5,
            pageButtonCount: 5,
            deleteConfirm: "Do you really want to delete the client?",

            data: dataList,

            fields: [
                { name: "Name", type: "text", width: 150, validate: "required" },
                { name: "Age", type: "number", width: 50 },
                { type: "control" }
            ]
        });

    });

    function funGetNewData() {
        debugger;
        var dataRow = $("#jsGrid").jsGrid("option", "data")[0];
    };

</script>

请帮助我,我需要找到有关此问题的任何解决方案

谢谢你华盛顿大学。

标签: javascriptjsgrid

解决方案


推荐阅读