关于easyui有关问题 (java web)

关于easyui问题 (java web)
小弟想通过文件上传,根据文件内容输出前台,而本次使用easyui datagrid,不知道如何动态加载文件的内容。本人是通过form表单提交,其输出是json格式的数据,但是datagrid不知道怎么接收~~请问大神们如何解决??
------解决方案--------------------
 $('#userDatagrid')
.datagrid(
{
url : 'userAction!datagrid',
title : '用户管理',
iconCls : 'icon-save',
pagination : true,
pageSize : 10,
pageList : [ 10, 20, 30, 50, 100, 200 ],
fit : true,
fitColumns : false,
nowrap : true,
border : false,
idField : 'id',
columns : [ [
{
title : '编号',
field : 'id',
width : 100,
sortable : true,
checkbox : true,
},
{
title : '名字',
field : 'name',
width : 100,
sortable : true,
editor : {
type : 'validatebox',
options : {
required : true
}

}
},
{
title : '密码',
field : 'password',
width : 230,
editor : {
type : 'validatebox',
options : {
required : true
}

},
formatter : function(value, rowIndex,
rowData) {
return '<span title="'+value+'">'
+ value + '</span>';
}
}
.....
....

------解决方案--------------------
还有中更简单的办法
<table id="dg"  class="easyui-datagrid"   
 data-options=" url: '填写你提交表单的文件', 
 "      
 >
<thead>
<tr> 
<th field="表单内元素的名称1" width="90"  >标题</strong></th>
<th field="表单内元素的名称2" width="90"  >标题</strong></th>
<tr>
</thead>
 

动态加载数据用reload方法
$('#dg').datagrid('reload');

------解决方案--------------------
datagrid('reload');
------解决方案--------------------
引用:
Quote: 引用:

Quote: 引用:

这个可以加载文件输出的内容吗,怎么看不出来~~


先上传文件到后台,后台解析文件内容,返回到前台。用easyui渲染



我已经将文件内容解析好了,返回json,但是就不知道easyui怎么渲染?


看一楼
------解决方案--------------------
引用:
Quote: 引用:

还有中更简单的办法
<table id="dg"  class="easyui-datagrid"   
 data-options=" url: '填写你提交表单的文件', 
 "      
 >
<thead>
<tr> 
<th field="表单内元素的名称1" width="90"  >标题</strong></th>
<th field="表单内元素的名称2" width="90"  >标题</strong></th>
<tr>
</thead>
 

动态加载数据用reload方法
$('#dg').datagrid('reload');



在url属性填写文件的id?

是你输出json数据那个文件或者方法