日期:2014-05-16  浏览次数:20381 次

easyui中怎么用ajax刷新datagrid
看这里
http://bbs.csdn.net/topics/390716097
------解决方案--------------------
使用easyui-grid控件的updateRow方法进行指定行的更新来达到局部更新的作用

$('#dg').datagrid('updateRow',{
index: 2,
row: {
name: 'new name',
note: 'new note message'
}
});

其row的数据由ajax请求得到   再使用该方法去局部更新,其他详情自己看官方doc
------解决方案--------------------
xx.php输出html?

输出这个干吗,又不是datagrid需要的数据。

如果你要修改条件,可以用load方法,新增加你的参数就行了

Load and show the first page rows. If the 'param' is specified, it will replace with the queryParams property. Usually do a query by passing some parameters, this method can be called to load new data from server.

$('#dg').datagrid('load',{
code: '01',
name: 'name01'
});