$(function () {
var datagrid;
var editRow = undefined;
datagrid = $("#parameter").datagrid({
columns: [[
{ field: 'Key', title: '字段名',halign:'center',width:'50%',editor: { type: 'textbox', options: { required: false} }},
{ field: 'Value', title: '值',halign:'center',width:'50%',editor: { type: 'textbox', options: { required: false} }}
]],
toolbar: [{ text: '添加', iconCls: 'icon-add', handler: function () {
if (editRow != undefined) {
datagrid.datagrid("endEdit", editRow);
}
if (editRow == undefined) {
datagrid.datagrid("insertRow", {
index: 0,
row: {}
});
datagrid.datagrid("beginEdit", 0);
editRow = 0;
editRowNode=0;
easyui datagrid一般创建模板
最新推荐文章于 2024-01-18 04:10:25 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)