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

easyui-datagrid 实用方法

2016-06-24 15:26 465 查看
1. 获取指定行的数据  var row = $('#div').datagrid('getData').rows[index];

2. 展示行的详细信息(这个是从网上找的原文地址百里马博客

$(function () {
$('#<span style="color:#ff0000;">div</span>').datagrid({
view: detailview,
detailFormatter: function (index, row) {
return '<div style="padding:4px"><table class="ddv"></table></div>';
},
onExpandRow: function (index, row) {
var ddv = $(this).datagrid('getRowDetail', index).find('table.ddv');
ddv.datagrid({
url: '/Car_Manage/miniData.ashx?Method=getData&value=3&flag=dri',
fitColumns: true,
singleSelect: true,
rownumbers: true,
loadMsg: '',
height: 'auto',
fitColumns: true,
columns: [[
{ field: '字段', title: '字段说明', width: 100,align:'center' },
]],
onResize: function () {
$('#<span style="color:#ff0000;">div</span>').datagrid('fixDetailRowHeight', index);
},
onLoadSuccess: function () {
setTimeout(function () {
$('#<span style="color:#ff0000;">div</span>').datagrid('fixDetailRowHeight', index);
}, 0);
}
});
$('#<span style="color:#ff0000;">div</span>').datagrid('fixDetailRowHeight', index);
}
});
});
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  easyui datagrid 详细