自己好好看DataGrid的API http://www.jeasyui.com/documentation/index.php appendRow row Append a new row. The new row will be added to the last position:$('#dg').datagrid('appendRow',{ name: 'new name', age: 30, note: 'some messages' });insertRow param Insert a new row, the param contains following properties: index: the row index to insert into, if not defined, append the new row. row: the row data. Code examples:// insert a new row at second row position $('#dg').datagrid('insertRow',{ index: 1, // index start with 0 row: { name: 'new name', age: 30, note: 'some messages' } });
data 我不需要传参数 可以不写的
http://www.jeasyui.com/documentation/index.php
appendRow row Append a new row. The new row will be added to the last position:$('#dg').datagrid('appendRow',{
name: 'new name',
age: 30,
note: 'some messages'
});insertRow param Insert a new row, the param contains following properties:
index: the row index to insert into, if not defined, append the new row.
row: the row data. Code examples:// insert a new row at second row position
$('#dg').datagrid('insertRow',{
index: 1, // index start with 0
row: {
name: 'new name',
age: 30,
note: 'some messages'
}
});