您的位置:首页 > 产品设计 > UI/UE

easyui datagrid url mvc 参数动态

2014-04-08 11:19 423 查看
页面代码
<table id="dgUser" title="用户列表" class="easyui-datagrid" style="width:700px;height:250px"
url=@Url.Content("~/UserManage/GetList")
data-options="
rownumbers:true,
singleSelect:true,
autoRowHeight:false,
pagination:true,
fit:true,
toolbar:'#toolbar',
pageSize:10,
fitColumns:true">
<thead>
<tr>
<th field="UserId" width="50">用户id</th>
<th field="UserName" width="50">用户名称</th>
<th field="Sex" width="50" data-options="formatter:sexFormatter">性别</th>
<th field="BirthDay" width="50">生日</th>
<th field="Address" width="50">住址</th>
</tr>
</thead>
</table>


加上 js即可

查询时的方法

function reload() {

$('#dgUser').datagrid({

url: rootUrl + "UserManage/GetList?username='4'"

});

}

参考:/article/1494221.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: