jsGrid-单击提交按钮时获取新数据

时间:2018-10-11 21:15:39

标签: javascript 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>

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

  

谢谢你。

0 个答案:

没有答案