easyui扩展数据表格点击加号拓展
Posted bchange
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了easyui扩展数据表格点击加号拓展相关的知识,希望对你有一定的参考价值。
$(function(){ $("#RepaymentInfoTab").datagrid({ view: detailview, detailFormatter:function(index,row){ return ‘<div style="padding:2px"><table id="ddv-‘ + index + ‘"></table></div>‘; }, onExpandRow:function(index,row){ var repaymentNum = row.repaymentNum; $(‘#ddv-‘+index).datagrid({ url:‘getSaleInfoData?repaymentNum=‘ + repaymentNum, fitColumns:true, singleSelect:true, height:‘auto‘, columns:[[ {field:‘salesNum1‘,title:‘计划消费流水‘,width:20}, {field:‘salesMoney1‘,title:‘计划消费金额‘,width:20}, {field:‘difference1‘,title:‘差额(消费-还款)‘,width:20}, {field:‘status1‘,title:‘计划消费状态‘,width:20,formatter:function(value){ if (value == 1) {return ‘<span style="color:red">初始化</span>‘; } if (value == 2) {return ‘<span style="color:blue">消费完成</span>‘; } if (value == 3) {return ‘<span style="color:blue">遗弃</span>‘; } }}, {field:‘transNo1‘,title:‘交易流水号‘,width:20}, {field:‘sendDate1‘,title:‘交易时间‘,width:20}, {field:‘creaetetime1‘,title:‘添加时间‘,width:20}, ]], onResize:function(){ $(‘#RepaymentInfoTab‘).datagrid(‘fixDetailRowHeight‘,index); }, onLoadSuccess:function(){ setTimeout(function(){ $(‘#RepaymentInfoTab‘).datagrid(‘fixDetailRowHeight‘,index); },0); } }); $(‘#RepaymentInfoTab‘).datagrid(‘fixDetailRowHeight‘,index); } }) })
以上是关于easyui扩展数据表格点击加号拓展的主要内容,如果未能解决你的问题,请参考以下文章