columns: [[
{field: 'title', title: '标题' },
{ field: 'announce_type', title: '类型' },
{ field: 'personel_autoid', title: '操作人' },
{ field: 'content', title: '内容', width: 200 },
{ field: 'state', title: '状态' },
{ field: 'date', title: '发布时间', align: 'right', sortable: true },
{ field: 'endDate', title: '结束时间', align: 'right' },
{ field: 'aa', title: '操作', formatter: function(value,row,index){
return "<a >删除</a> <a >编辑</a>";
}
}
]]
value 是当前的列值,你可以随便写个没有的列 ,就是没值。
row 是当前行的一个json 。
index 是行号 。
{field: 'title', title: '标题' },
{ field: 'announce_type', title: '类型' },
{ field: 'personel_autoid', title: '操作人' },
{ field: 'content', title: '内容', width: 200 },
{ field: 'state', title: '状态' },
{ field: 'date', title: '发布时间', align: 'right', sortable: true },
{ field: 'endDate', title: '结束时间', align: 'right' },
{ field: 'aa', title: '操作', formatter: function(value,row,index){
return "<a >删除</a> <a >编辑</a>";
}
}
]]
value 是当前的列值,你可以随便写个没有的列 ,就是没值。
row 是当前行的一个json 。
index 是行号 。
function edit() {
var row = $('#tabAnnce').datagrid('getSelected');
if (row) {
$('#tabAnnceForm').form('load', row);
url = "..url+“?title="+ row.title;
}
}
$('#tabAnnceForm').form('submit', {
url : url,
onSubmit : function() {
return $(this).form('validate');
},
success : function(result) {
}
});