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>
请帮助我,我需要找到有关此问题的任何解决方案
谢谢你华盛顿大学。
解决方案
推荐阅读
- python-3.x - 在不存在的行上解析错误时出现意外的 EOF
- c# - Asp .Net Core 在数据库检查布局上隐藏菜单
- javascript - 如何使用 node express 从 MongoDB 获取最后插入的 _id
- android - 如何在 Android 应用程序中集成对话框流
- reactjs - 输入字段值不是预期的
- python - Google App Engine:ImportError:没有名为 pkg_resources 的模块
- c++ - 为什么 cout 与三进制和 int 一起使用时会打印 char 的 ascii 值?
- ios - 在 Vapor 中寻找祖父母
- c++ - 在具有分数增量的 for 循环中使用“双”数据类型的问题
- r - 如何使用 lavaan 获得交叉载荷?